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

28 lines
788 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:33:23 +00:00
- name: Docker pull
run: docker pull ubuntu:latest
2023-08-05 09:34:09 +00:00
- name: Var envs
run: export
2023-08-05 09:42:11 +00:00
- name: Make tag
id: tag_vars
2023-08-05 09:54:06 +00:00
run: echo "IMAGE_NAME=$(echo '$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY' | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)" >> $GITHUB_OUTPUT
2023-08-05 09:45:39 +00:00
- name: Print tag
2023-08-05 09:54:33 +00:00
run: echo ${{ steps.tag_vars.outputs.IMAGE_NAME }}
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