55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- 'ci-test'
|
|
tags:
|
|
- 'v*'
|
|
paths:
|
|
- '**.go'
|
|
- '**.html'
|
|
- 'Dockerfile'
|
|
- 'Dockerfile.*'
|
|
- 'docker-bake.hcl'
|
|
- '.forgejo/workflows/*.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
bake:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Prepare Registry FQDN
|
|
id: registry
|
|
run: |
|
|
registry=${{ github.server_url }}
|
|
registry=${registry##http*://}
|
|
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Login to Container Registry
|
|
uses: https://code.forgejo.org/docker/login-action@v3
|
|
with:
|
|
registry: ${{ steps.registry.outputs.registry }}
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.TOKEN }}
|
|
|
|
- name: Checkout
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: https://code.forgejo.org/docker/setup-buildx-action@v3
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: https://code.forgejo.org/docker/metadata-action@v5
|
|
with:
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
|
|
- name: Build and push
|
|
uses: https://code.forgejo.org/docker/bake-action@v6
|
|
with:
|
|
source: .
|
|
env:
|
|
TAG: ${{ steps.meta.outputs.tags }}
|