name: Build and Push Docker Image on: push: branches: - main jobs: prepare: runs-on: ubuntu-latest steps: - name: Set up Docker Buildx 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=raw,value=latest labels: | maintainer=${{ github.actor }} org.opencontainers.image.title=GoDash org.opencontainers.image.licenses=Apache-2.0 org.opencontainers.image.description=Blazing fast start page for your services org.opencontainers.image.vendor=Unjx org.opencontainers.image.port=4000 - name: Login to Forgejo Container Registry uses: docker/login-action@v3 with: registry: git.unjx.de username: ${{ github.actor }} password: ${{ secrets.CI_TOKEN }} - name: Build uses: docker/build-push-action@v6 with: push: true tags: ${{ steps.meta.outputs.tags }} build-args: | V_GOLANG=${{ vars.V_GOLANG }} V_NODE=${{ vars.V_NODE }} V_ALPINE=${{ vars.V_ALPINE }} APP_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} BUILD_TIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} secrets: | GIT_AUTH_TOKEN=${{ secrets.CI_TOKEN }}