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

34 lines
1.0 KiB
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
2023-08-05 10:48:53 +00:00
run: docker login ${{ GITHUB_SERVER_URL }} -u ${{ GITHUB_REPOSITORY_OWNER }} --password not-a-password
2023-08-05 10:52:54 +00:00
- name: Login to register
2023-08-05 11:05:27 +00:00
uses: https://gitea.com/docker/login-actions@v2
2023-08-05 10:52:54 +00:00
with:
registry: git.halis.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
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