2024-10-31 08:14:53 +01:00
|
|
|
name: Build and Push Docker Image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2024-10-31 09:27:01 +01:00
|
|
|
prepare:
|
2024-10-31 09:35:03 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-10-31 08:14:53 +01:00
|
|
|
steps:
|
2024-10-31 09:35:03 +01:00
|
|
|
- name: Checkout
|
2024-10-31 09:13:16 +01:00
|
|
|
uses: actions/checkout@v4
|
2024-10-31 09:35:03 +01:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-10-31 10:07:52 +01:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: git.unjx.de/${{ github.repository }}
|
|
|
|
tags: |
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.title=GoDash
|
|
|
|
org.opencontainers.image.description=Blasing fast start page for your services
|
|
|
|
org.opencontainers.image.vendor=Unjx
|
2024-10-31 09:35:03 +01:00
|
|
|
- name: Login to Forgejo Container Registry
|
2024-10-31 09:13:16 +01:00
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
2024-10-31 09:35:03 +01:00
|
|
|
registry: git.unjx.de
|
2024-10-31 09:13:16 +01:00
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ github.token }}
|
2024-10-31 10:02:26 +01:00
|
|
|
- name: Build
|
2024-10-31 09:13:16 +01:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
2024-10-31 10:13:40 +01:00
|
|
|
load: true
|
2024-10-31 10:07:52 +01:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
2024-10-31 09:13:16 +01:00
|
|
|
build-args: |
|
|
|
|
V_GOLANG=${{ vars.V_GOLANG }}
|
|
|
|
V_NODE=${{ vars.V_NODE }}
|
|
|
|
V_ALPINE=${{ vars.V_ALPINE }}
|
2024-10-31 10:02:26 +01:00
|
|
|
- name: Push
|
2024-10-31 10:13:40 +01:00
|
|
|
run: docker push ${{ steps.meta.outputs.tags }}
|