godash/.forgejo/workflows/build_deploy.yaml
Florian Hoss 78ed9c3f8c
All checks were successful
Build and Push Docker Image / prepare (push) Successful in 1m7s
Update packages
2024-10-31 14:30:15 +01:00

45 lines
1.5 KiB
YAML

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
- 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 }}