S3-Mounter/.gitea/workflows/container-build.yaml

28 lines
848 B
YAML
Raw Normal View History

2023-08-04 15:47:47 +00:00
name: S3 mount container image build
on:
release:
types: [published]
push:
2023-08-04 16:35:44 +00:00
workflow_dispatch:
2023-08-04 15:47:47 +00:00
jobs:
build:
2023-08-04 16:49:00 +00:00
container:
2023-08-05 09:30:50 +00:00
image: docker:latest
2023-08-04 15:47:47 +00:00
runs-on: [arm64]
steps:
2023-08-05 09:42:11 +00:00
- name: Make tag
id: tag_vars
2023-08-05 10:03:33 +00:00
run: echo "IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)" >> $GITHUB_OUTPUT
2023-08-05 10:20:20 +00:00
- name: Docker login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ GITHUB_SERVER_URL }} -u ${{ GITHUB_REPOSITORY_OWNER }}
2023-08-05 10:00:17 +00:00
- name: Docker pull
run: docker pull ubuntu:latest
- name: Var envs
run: export
2023-08-05 09:33:23 +00:00
- name: Docker retag
2023-08-05 09:42:11 +00:00
run: docker tag ubuntu:latest ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest
2023-08-05 09:33:23 +00:00
- name: Docker push
2023-08-05 09:43:38 +00:00
run: docker push ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest