forgejo-runner-dind/.forgejo/workflows/docker.yaml

55 lines
1.3 KiB
YAML
Raw Normal View History

2024-03-31 10:41:45 +00:00
name: docker
on:
push:
branches:
- master
tags:
- "v*"
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
- name: Docker meta
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
images: git.kmsign.ru/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
pull: true
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
sbom: true
provenance: true
tags: ${{ steps.meta.outputs.tags }}