47 lines
1.2 KiB
YAML
47 lines
1.2 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
|
|
with:
|
|
fetch-depth: 0 # all history for all branches and tags
|
|
|
|
- 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: Lowercase Name
|
|
run: |
|
|
ls /var/run/act/workflow
|
|
cat /var/run/act/workflow/3.sh
|
|
# echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${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
|
|
IMAGE_URL: ${{ GITHUB_SERVER_URL }}/${{ IMAGE_NAME }}
|
|
with:
|
|
context: containers/web
|
|
file: ./Containerfile
|
|
platforms: |
|
|
linux/amd64
|
|
push: true
|
|
tags: |
|
|
${{ env.IMAGE_URL }}:latest
|