Test build

This commit is contained in:
2024-03-06 19:44:57 +01:00
parent cf67fe6117
commit 7f4113d4ed
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
name: release-tag
on:
push:
branches: [ main ]
jobs:
release-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-22.04
env:
DOCKER_LATEST: latest
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: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
env:
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
IMAGE_NAME: gitea.marijndoeve.nl/Harmitcraft/${{ steps.meta.outputs.REPO_NAME }}
with:
context: containers/web
file: ./Containerfile
platforms: |
linux/amd64
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.DOCKER_LATEST }}