konfach-keycloak/.forgejo/workflows/image.yaml

57 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-06-11 22:22:29 +00:00
name: docker
on:
push:
branches:
2024-06-11 22:25:51 +00:00
- main
2024-06-11 22:22:29 +00:00
jobs:
build-docker:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.kmsign.ru
username: ${{ github.actor }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v3
2024-07-29 21:20:58 +00:00
with:
submodules: "recursive"
2024-06-11 22:22:29 +00:00
- name: Docker meta
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: git.kmsign.ru/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
2024-07-29 21:20:58 +00:00
type=sha
2024-06-11 22:22:29 +00:00
- name: Build and push Docker image
2024-07-30 08:32:12 +00:00
uses: docker/build-push-action@v6
2024-06-11 22:22:29 +00:00
with:
context: .
push: true
pull: true
2024-07-30 08:32:12 +00:00
platforms: linux/amd64,linux/arm64
2024-06-11 22:22:29 +00:00
labels: ${{ steps.meta.outputs.labels }}
sbom: true
provenance: true
tags: ${{ steps.meta.outputs.tags }}