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

46 lines
1.2 KiB
YAML
Raw Normal View History

2024-07-17 12:40:51 +02:00
name: Publish
on:
push:
tags:
- 'v*'
jobs:
tests:
2024-07-17 12:44:13 +02:00
uses: ./.gitea/workflows/node.yml
2024-07-17 12:40:51 +02:00
publish:
name: Publishing
needs: [tests]
runs-on: ubuntu-latest
2024-07-17 12:52:28 +02:00
env:
DOCKER_ORG: vbrandl
DOCKER_LATEST: latest
2024-07-17 12:40:51 +02:00
steps:
- name: Checkout sources
uses: actions/checkout@v4
2024-07-17 12:40:51 +02:00
2024-07-17 13:03:02 +02:00
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: https://git.vbrandl.net
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASS }}
2024-07-17 12:40:51 +02:00
- 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@v4
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 }}