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

30 lines
894 B
YAML
Raw Normal View History

2023-08-04 17:47:47 +02:00
name: S3 mount container image build
on:
release:
types: [published]
push:
2023-08-04 18:35:44 +02:00
workflow_dispatch:
2023-08-04 17:47:47 +02:00
jobs:
build:
2023-08-04 18:49:00 +02:00
container:
2023-08-05 11:30:50 +02:00
image: docker:latest
2023-08-04 17:47:47 +02:00
runs-on: [arm64]
steps:
2023-08-05 11:33:23 +02:00
- name: Docker pull
run: docker pull ubuntu:latest
2023-08-05 11:34:09 +02:00
- name: Var envs
run: export
2023-08-05 11:42:11 +02:00
- name: Make tag
id: tag_vars
2023-08-05 11:57:35 +02:00
run: echo "IMAGE_NAME=$(echo \"$GITHUB_SERVER_URL\"/\"$GITHUB_REPOSITORY\" | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)" >> $GITHUB_OUTPUT
2023-08-05 11:56:45 +02:00
- name: Debug tag
run: echo "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]'
2023-08-05 11:45:39 +02:00
- name: Print tag
2023-08-05 11:58:10 +02:00
run: echo ${{ steps.tag_vars.outputs }}
2023-08-05 11:33:23 +02:00
- name: Docker retag
2023-08-05 11:42:11 +02:00
run: docker tag ubuntu:latest ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest
2023-08-05 11:33:23 +02:00
- name: Docker push
2023-08-05 11:43:38 +02:00
run: docker push ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest