Use docker meta
Some checks failed
Build and Push Docker Image / prepare (push) Failing after 1m9s

This commit is contained in:
Florian Hoss 2024-10-31 10:07:52 +01:00
parent 6547a81b19
commit f900497d48
Signed by: flohoss
GPG key ID: 3F35C7F6E6F66F6B

View file

@ -5,10 +5,6 @@ on:
branches: branches:
- main - main
env:
REGISTRY: git.unjx.de
LATEST_IMAGE: ${{ env.REGISTRY }}/${{ github.repository }}:latest
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -17,6 +13,20 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.unjx.de/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=GoDash
org.opencontainers.image.description=Blasing fast start page for your services
org.opencontainers.image.vendor=Unjx
- name: Login to Forgejo Container Registry - name: Login to Forgejo Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -26,7 +36,7 @@ jobs:
- name: Build - name: Build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
tags: ${{ env.LATEST_IMAGE }} tags: ${{ steps.meta.outputs.tags }}
build-args: | build-args: |
V_GOLANG=${{ vars.V_GOLANG }} V_GOLANG=${{ vars.V_GOLANG }}
V_NODE=${{ vars.V_NODE }} V_NODE=${{ vars.V_NODE }}