This repository has been archived on 2024-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
fotochallenge/.gitea/workflows/publish.yml
Valentin Brandl 88b158b7b4
All checks were successful
/ Misc Linters (push) Successful in 27s
/ Build App (push) Successful in 59s
Lint before publish
2024-08-16 15:10:18 +02:00

49 lines
1.2 KiB
YAML

name: Publish
on:
push:
tags:
- 'v*'
jobs:
lints:
uses: ./.gitea/workflows/lints.yml
tests:
uses: ./.gitea/workflows/node.yml
publish:
name: Publishing
needs: [tests]
runs-on: ubuntu-latest
env:
DOCKER_ORG: vbrandl
DOCKER_LATEST: latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: https://git.vbrandl.net
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASS }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Containerfile
push: true
tags: |
git.vbrandl.net/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
git.vbrandl.net/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}