This commit is contained in:
@@ -10,7 +10,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: prodesk
|
runs-on: prodesk
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -25,21 +24,17 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Set Docker tags
|
- name: Docker metadata
|
||||||
id: docker-tags
|
id: meta
|
||||||
run: |
|
uses: docker/metadata-action@v5
|
||||||
TAGS="calahilstudios/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest"
|
with:
|
||||||
TAGS="$TAGS
|
images: gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
|
||||||
calahilstudios/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}"
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
# Add version tag if this is a v* tag push
|
type=semver,pattern={{version}}
|
||||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
TAG_NAME="${{ github.ref_name }}"
|
type=sha
|
||||||
TAGS="$TAGS
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
calahilstudios/${{ github.repository_owner }}/${{ github.event.repository.name }}:${TAG_NAME}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "TAGS=$TAGS" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -47,4 +42,5 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.TAGS }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
Reference in New Issue
Block a user