Files
ZomboidForge/.gitea/workflows/release.yml
T

46 lines
1.5 KiB
YAML

# Publishes an image for every new Project Zomboid version (hotfixes included) of each
# matrix entry and every new ZomboidForge release; full version tags are never overwritten
# (see ci/release.sh).
# Requires the repository secrets REGISTRY_USER and REGISTRY_TOKEN (a token with
# package write access) and a runner with a Docker (or Podman) CLI.
name: release
on:
# Every 2.5 hours; cron cannot divide a day into 2.5-hour steps, so the gap
# from 22:30 to 00:00 is 1.5 hours.
schedule:
- cron: "0 0,5,10,15,20 * * *"
- cron: "30 2,7,12,17,22 * * *"
workflow_dispatch:
jobs:
image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- pz_version: "42"
steam_branch: public
latest: "true"
steps:
- uses: actions/checkout@v4
with:
# release.sh derives the version from the v* tags
fetch-depth: 0
- name: Log in to the registry
env:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: echo "${REGISTRY_TOKEN}" | docker login git.security-command.org --username "${REGISTRY_USER}" --password-stdin
- name: Build and publish
env:
IMAGE: git.security-command.org/overlord/zomboidforge
PZ_VERSION: ${{ matrix.pz_version }}
PZ_BRANCH: ${{ matrix.steam_branch }}
PUBLISH: "true"
LATEST: ${{ matrix.latest }}
run: ci/release.sh