diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..dad201d --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,29 @@ +# Builds and verifies the image for every supported Project Zomboid version. +# Requires a runner with a Docker (or Podman) CLI and access to its daemon. +name: ci + +on: + push: + pull_request: + +jobs: + image: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + # One entry per supported version; add older Steam version branches + # (e.g. pz_version 42.19, steam_branch 42.19) to keep them building. + - pz_version: "42.21" + steam_branch: public + steps: + - uses: actions/checkout@v4 + + - name: Build and verify + env: + IMAGE: zomboidforge-ci + PZ_VERSION: ${{ matrix.pz_version }} + PZ_BRANCH: ${{ matrix.steam_branch }} + PUBLISH: "false" + run: ci/release.sh diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..2928324 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,38 @@ +# Publishes an image for every new Steam build of each supported Project Zomboid +# version. Immutable 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: + schedule: + - cron: "0 */6 * * *" + workflow_dispatch: + +jobs: + image: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - pz_version: "42.21" + steam_branch: public + latest: "true" + steps: + - uses: actions/checkout@v4 + + - 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