feat(build): builds develop branch to latest docker tag in workflow

This commit is contained in:
MiscFrizzy 2025-04-07 16:48:17 -04:00
parent 4936481ffc
commit cb8718c9b8

View file

@ -22,14 +22,21 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Docker tags
id: docker_meta
run: |
if [[ $GITHUB_REF == refs/heads/develop ]]; then
echo "tags=ghcr.io/pridevrinc/vrcauthproxy:latest" >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "tags=ghcr.io/pridevrinc/vrcauthproxy:${VERSION},ghcr.io/pridevrinc/vrcauthproxy:latest" >> $GITHUB_OUTPUT
fi
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: ./Dockerfile
platforms: linux/amd64
tags: |
ghcr.io/pridevrinc/vrcauthproxy:latest
ghcr.io/pridevrinc/vrcauthproxy:${{ github.ref }} # Push the tagged version
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max