mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-07-21 18:27:44 +00:00
A batch of small, self-contained fixes and docs/example additions. Fixes #625 - align the example config's `force_pull` with the actual default (`false`) Fixes #804 - return an error instead of discarding `os.UserHomeDir()` when defaulting `cache.dir`/`host.workdir_parent` Fixes #571 - send a `gitea-runner/<version>` User-Agent on API requests Fixes #650 - detect an `Unauthenticated` fetch response and exit the daemon with an error instead of retrying forever Fixes #766 - add `exec --eventpath` to supply a JSON event payload file Fixes #256 - add a `bug-report` subcommand that prints version/Go/OS-arch/CPU info Fixes #617 - add `runner.set_act_env` (default `true`) to optionally omit the `ACT=true` env var Fixes #635 - record a failure result (and guard a nil reusable-workflow caller) when the job `if`-expression fails to evaluate Fixes #1005 - remove README docs for config env-var overrides that were already removed from the code Fixes #448 - clarify in `exec --job` help that `--workflows` may be needed to disambiguate Fixes #209 - note that `host`-labelled runners still need Docker for `docker://` actions and service containers Fixes #757 - add a systemd service example with automatic restart Fixes #474 - add a Kubernetes StatefulSet example that persists the `.runner` registration across reschedules Fixes #776 - build the basic (non-dind) docker image for `linux/riscv64` Fixes #628 - build the basic (non-dind) docker image for `linux/s390x`Reviewed-on: https://gitea.com/gitea/runner/pulls/1075 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
97 lines
2.7 KiB
YAML
97 lines
2.7 KiB
YAML
---
|
|
name: release-nightly
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
DOCKER_ORG: gitea
|
|
DOCKER_LATEST: nightly
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: goreleaser
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
distribution: goreleaser-pro
|
|
args: release --nightly
|
|
env:
|
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
|
AWS_REGION: ${{ secrets.AWS_REGION }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
S3_REGION: ${{ secrets.AWS_REGION }}
|
|
S3_BUCKET: ${{ secrets.AWS_BUCKET }}
|
|
GORELEASER_FORCE_TOKEN: "gitea"
|
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
release-image:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
variant:
|
|
# The basic image is built from source and can target any arch the
|
|
# toolchain supports. The dind variants are limited to the arches the
|
|
# docker:dind base image publishes.
|
|
- target: basic
|
|
tag_suffix: ""
|
|
platforms: linux/amd64,linux/arm64,linux/riscv64,linux/s390x
|
|
- target: dind
|
|
tag_suffix: "-dind"
|
|
platforms: linux/amd64,linux/arm64
|
|
- target: dind-rootless
|
|
tag_suffix: "-dind-rootless"
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0 # all history for all branches and tags
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v4
|
|
|
|
- name: Set up Docker BuildX
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v4
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Echo the tag
|
|
run: echo "${{ env.DOCKER_ORG }}/runner:nightly${{ matrix.variant.tag_suffix }}"
|
|
|
|
- name: Get Meta
|
|
id: meta
|
|
run: |
|
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/-/+/' | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
target: ${{ matrix.variant.target }}
|
|
platforms: ${{ matrix.variant.platforms }}
|
|
push: true
|
|
tags: |
|
|
${{ env.DOCKER_ORG }}/runner:nightly${{ matrix.variant.tag_suffix }}
|
|
build-args: |
|
|
VERSION=${{ steps.meta.outputs.REPO_VERSION }}
|