backup-container/.forgejo/workflows/docker-publish.yml

23 lines
707 B
YAML

name: Docker
on:
push:
branches:
- "**"
tags:
- v*.*.*
jobs:
build:
runs-on: docker
steps:
- name: Checkout repository
uses: https://code.forgejo.org/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- name: Build and publish image
uses: https://git.schmelczer.dev/andras/ci-actions/docker-publish@10ab5db88c5f6fc1d2a368ce0ea934807f7ebfca
with:
context: .
push: ${{ (github.ref == 'refs/heads/main' || github.ref_type == 'tag') }}
token: ${{ ((github.ref == 'refs/heads/main' || github.ref_type == 'tag')) && secrets.FORGEJO_PACKAGE_TOKEN || '' }}