50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: release-tag
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
release-image:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker BuildX
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.marijndoeve.nl
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: gitea.marijndoeve.nl/${{github.repository}}
|
|
|
|
- name: Lowercase Name
|
|
run: |
|
|
echo "IMAGE_NAME=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
env:
|
|
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
|
|
with:
|
|
context: containers/web
|
|
file: containers/web/Containerfile
|
|
# platforms: |
|
|
# linux/amd64
|
|
push: true
|
|
build-args: |
|
|
${{ steps.meta.outputs.json }}
|
|
# tags: |
|
|
# gitea.marijndoeve.nl/${{ env.IMAGE_NAME }}:latest
|