Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
9fcf481827
|
|||
| a05bca6f01 | |||
| 1a87cc50e9 | |||
| 8d7432ff69 | |||
| ee9cca3d81 | |||
| 9fe57aee71 | |||
| 57e0428658 | |||
| f2902d4a1f |
@@ -15,6 +15,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure portage + install tooling
|
- name: Configure portage + install tooling
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p /etc/portage/repos.conf
|
||||||
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
||||||
> /etc/portage/repos.conf/gentoo.conf
|
> /etc/portage/repos.conf/gentoo.conf
|
||||||
sed -i 's/^verify-signature = true/verify-signature = false/' \
|
sed -i 's/^verify-signature = true/verify-signature = false/' \
|
||||||
@@ -25,9 +26,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Check for new release and open PR
|
- name: Check for new release and open PR
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
BUMP_TOKEN: ${{ secrets.BUMP_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
host=${GITHUB_SERVER_URL#http://}; host=${host#https://}
|
host=${GITHUB_SERVER_URL#http://}; host=${host#https://}
|
||||||
curl -fsSL "http://x-access-token:${GITEA_TOKEN}@${host}/${GITHUB_REPOSITORY}/raw/branch/master/scripts/bump-version.sh" \
|
curl -fsSL "http://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}/raw/branch/master/scripts/bump-version.sh" \
|
||||||
-o /tmp/bump-version.sh
|
-o /tmp/bump-version.sh
|
||||||
bash /tmp/bump-version.sh
|
bash /tmp/bump-version.sh
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ jobs:
|
|||||||
# can be pulled instead of compiled.
|
# can be pulled instead of compiled.
|
||||||
- name: Configure portage
|
- name: Configure portage
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p /etc/portage/repos.conf
|
||||||
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
||||||
> /etc/portage/repos.conf/gentoo.conf
|
> /etc/portage/repos.conf/gentoo.conf
|
||||||
sed -i 's/^verify-signature = true/verify-signature = false/' \
|
sed -i 's/^verify-signature = true/verify-signature = false/' \
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# azy5030 overlay
|
# azy5030 overlay
|
||||||
|
|
||||||
|
[](https://git.azy.dev/azy5030/azy5030-overlay/actions?workflow=ci.yaml)
|
||||||
|
|
||||||
A personal [Gentoo ebuild repository](https://wiki.gentoo.org/wiki/Ebuild_repository)
|
A personal [Gentoo ebuild repository](https://wiki.gentoo.org/wiki/Ebuild_repository)
|
||||||
(overlay) for packages not in the main ::gentoo tree.
|
(overlay) for packages not in the main ::gentoo tree.
|
||||||
|
|
||||||
@@ -24,5 +26,5 @@ emerge dev-util/gitea-runner
|
|||||||
every push and asserts the resulting binary runs.
|
every push and asserts the resulting binary runs.
|
||||||
- `.gitea/workflows/bump.yaml` runs `scripts/bump-version.sh` daily: it checks the
|
- `.gitea/workflows/bump.yaml` runs `scripts/bump-version.sh` daily: it checks the
|
||||||
upstream releases feed and, when a newer version exists, regenerates + uploads the
|
upstream releases feed and, when a newer version exists, regenerates + uploads the
|
||||||
vendor tarball, bumps the ebuild, and opens a pull request. Requires a `GITEA_TOKEN`
|
vendor tarball, bumps the ebuild, and opens a pull request. Requires a `BUMP_TOKEN`
|
||||||
repository secret (scopes: repository read/write, write release).
|
repository secret (scopes: repository read/write, write release).
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
DIST gitea-runner-1.0.4-vendor.tar.xz 3007156 BLAKE2B b9b7b03f607298a390b513bdc6824a2eba58bf7c1ed2e9e09556b309cb62669f1e5fc8fef6f62ce7a74f3a23573280158cb32d3b412394101f81cf8f19cdf64b SHA512 5309ef21c054a07b37a5ea1f5dd47cd6c424375a29f437ef743cb5719e8160e0c22a017175dad0b612291f444508b8dbe8e5fefabc9aac946c1217910aae6dd6
|
DIST gitea-runner-1.0.7-vendor.tar.xz 3018704 BLAKE2B 39b861b1b454a22f23c80bacd551127d0812b71a336c79032fa01f8df834eca23e030479da76fc12358af955f7cb56bcc541b99df1fd7880a62fbf35b8859d4c SHA512 0f21ba48db4bbb9fc0738543a7123e884e93ab5b423b6ff99dfa913d6df6cf0db4d96bff2e32b82beee9fef8e81cfdef849d58050fe8d9a2abddb55af7da8a38
|
||||||
DIST gitea-runner-1.0.4.tar.gz 326258 BLAKE2B 1908718d033b658238f735baed3323b53c85c5b5a471b8a7e543a1d7ef3898c1220a7fa27ff8e4224ae9f24960a6532699d9de770dc6ed7b5649dc0c5d624058 SHA512 5f7bdc31ce9b2c34dbac161f2a29a1be33a16a8118d9d1d58aef05de621ba542360afdb2af6fa4042d8cb7ab3421e9d1cd0f3c5102ddf85fc08a089ebb28a496
|
DIST gitea-runner-1.0.7.tar.gz 340157 BLAKE2B 7dc0fb3026e02c14052d4983f265adf787d9f3f01d856e81a4297a3163a1d2efe19f5ae6b9132fe4520ca551c84e7749ea33c7eeff87806870b0a9b60c54719f SHA512 8f0c69bb0e416efca1b63ae37cad0f740a5093bc569711b9327cd11a69f40d1037e59dc547ad3a88e8d6be7fa669a3acf58ac775237932f2872c492a7812cf96
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ inherit go-module
|
|||||||
DESCRIPTION="Gitea Actions runner (formerly act_runner)"
|
DESCRIPTION="Gitea Actions runner (formerly act_runner)"
|
||||||
HOMEPAGE="https://gitea.com/gitea/runner"
|
HOMEPAGE="https://gitea.com/gitea/runner"
|
||||||
SRC_URI="
|
SRC_URI="
|
||||||
https://gitea.com/gitea/runner/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
https://gitea.com/api/v1/repos/gitea/runner/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||||
https://git.azy.dev/azy5030/azy5030-overlay/releases/download/${PN}-${PV}-vendor/${P}-vendor.tar.xz
|
https://git.azy.dev/azy5030/azy5030-overlay/releases/download/${PN}-${PV}-vendor/${P}-vendor.tar.xz
|
||||||
"
|
"
|
||||||
S="${WORKDIR}/runner"
|
S="${WORKDIR}/runner"
|
||||||
+13
-9
@@ -4,22 +4,25 @@
|
|||||||
# ebuild, regenerate the Manifest, and open a pull request.
|
# ebuild, regenerate the Manifest, and open a pull request.
|
||||||
#
|
#
|
||||||
# Expects a Gentoo environment with: go, pkgdev, git, curl, xz, jq.
|
# Expects a Gentoo environment with: go, pkgdev, git, curl, xz, jq.
|
||||||
# Required env: GITEA_TOKEN, GITHUB_SERVER_URL, GITHUB_REPOSITORY.
|
# Required env: BUMP_TOKEN, GITHUB_SERVER_URL, GITHUB_REPOSITORY.
|
||||||
# Optional env: GITHUB_API_URL (defaults to ${GITHUB_SERVER_URL}/api/v1).
|
# Optional env: GITHUB_API_URL (defaults to ${GITHUB_SERVER_URL}/api/v1).
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
PN="gitea-runner"
|
PN="gitea-runner"
|
||||||
UPSTREAM_RSS="https://gitea.com/gitea/runner/releases.rss"
|
UPSTREAM_RSS="https://gitea.com/gitea/runner/releases.rss"
|
||||||
UPSTREAM_ARCHIVE="https://gitea.com/gitea/runner/archive"
|
UPSTREAM_ARCHIVE="https://gitea.com/api/v1/repos/gitea/runner/archive"
|
||||||
UPSTREAM_GOMOD="https://gitea.com/gitea/runner/raw/tag"
|
UPSTREAM_GOMOD="https://gitea.com/api/v1/repos/gitea/runner/raw/go.mod"
|
||||||
|
|
||||||
: "${GITEA_TOKEN:?GITEA_TOKEN is required}"
|
: "${BUMP_TOKEN:?BUMP_TOKEN is required}"
|
||||||
: "${GITHUB_SERVER_URL:?GITHUB_SERVER_URL is required}"
|
: "${GITHUB_SERVER_URL:?GITHUB_SERVER_URL is required}"
|
||||||
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
|
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
|
||||||
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
||||||
|
|
||||||
host=${GITHUB_SERVER_URL#http://}; host=${host#https://}
|
# Preserve the scheme of GITHUB_SERVER_URL — on a Gitea runner this is the
|
||||||
api() { curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$@"; }
|
# internal endpoint (e.g. http://172.17.0.1:3000), which speaks plain HTTP.
|
||||||
|
scheme="${GITHUB_SERVER_URL%%://*}"
|
||||||
|
host="${GITHUB_SERVER_URL#*://}"
|
||||||
|
api() { curl -fsSL -H "Authorization: token ${BUMP_TOKEN}" "$@"; }
|
||||||
|
|
||||||
# --- determine versions ------------------------------------------------------
|
# --- determine versions ------------------------------------------------------
|
||||||
latest=$(curl -fsSL "$UPSTREAM_RSS" \
|
latest=$(curl -fsSL "$UPSTREAM_RSS" \
|
||||||
@@ -28,7 +31,7 @@ latest=$(curl -fsSL "$UPSTREAM_RSS" \
|
|||||||
[ -n "$latest" ] || { echo "could not parse upstream version"; exit 1; }
|
[ -n "$latest" ] || { echo "could not parse upstream version"; exit 1; }
|
||||||
|
|
||||||
WORK=$(mktemp -d)
|
WORK=$(mktemp -d)
|
||||||
git clone "https://x-access-token:${GITEA_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK"
|
git clone "${scheme}://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK"
|
||||||
cd "$WORK"
|
cd "$WORK"
|
||||||
pkgdir="dev-util/${PN}"
|
pkgdir="dev-util/${PN}"
|
||||||
|
|
||||||
@@ -79,7 +82,7 @@ git checkout -b "$branch"
|
|||||||
git mv "${pkgdir}/${PN}-${current}.ebuild" "${pkgdir}/${PN}-${latest}.ebuild"
|
git mv "${pkgdir}/${PN}-${current}.ebuild" "${pkgdir}/${PN}-${latest}.ebuild"
|
||||||
|
|
||||||
# Track the upstream go.mod's required Go version in BDEPEND.
|
# Track the upstream go.mod's required Go version in BDEPEND.
|
||||||
goreq=$(curl -fsSL "${UPSTREAM_GOMOD}/v${latest}/go.mod" \
|
goreq=$(curl -fsSL "${UPSTREAM_GOMOD}?ref=v${latest}" \
|
||||||
| grep -oE '^go [0-9]+\.[0-9]+(\.[0-9]+)?' | awk '{print $2}')
|
| grep -oE '^go [0-9]+\.[0-9]+(\.[0-9]+)?' | awk '{print $2}')
|
||||||
[ -n "$goreq" ] && sed -i -E \
|
[ -n "$goreq" ] && sed -i -E \
|
||||||
"s#^BDEPEND=\">=dev-lang/go-[0-9.]+\"#BDEPEND=\">=dev-lang/go-${goreq}\"#" \
|
"s#^BDEPEND=\">=dev-lang/go-[0-9.]+\"#BDEPEND=\">=dev-lang/go-${goreq}\"#" \
|
||||||
@@ -89,6 +92,7 @@ goreq=$(curl -fsSL "${UPSTREAM_GOMOD}/v${latest}/go.mod" \
|
|||||||
mkdir -p /var/cache/distfiles
|
mkdir -p /var/cache/distfiles
|
||||||
cp "${dist}/${PN}-${latest}.tar.gz" /var/cache/distfiles/
|
cp "${dist}/${PN}-${latest}.tar.gz" /var/cache/distfiles/
|
||||||
cp "${dist}/${PN}-${latest}-vendor.tar.xz" /var/cache/distfiles/
|
cp "${dist}/${PN}-${latest}-vendor.tar.xz" /var/cache/distfiles/
|
||||||
|
mkdir -p /etc/portage/repos.conf
|
||||||
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
printf '[DEFAULT]\nmain-repo = gentoo\n\n[gentoo]\nlocation = /var/db/repos/gentoo\n' \
|
||||||
> /etc/portage/repos.conf/gentoo.conf
|
> /etc/portage/repos.conf/gentoo.conf
|
||||||
printf '[azy5030]\nlocation = %s\nmasters = gentoo\nauto-sync = false\n' "$WORK" \
|
printf '[azy5030]\nlocation = %s\nmasters = gentoo\nauto-sync = false\n' "$WORK" \
|
||||||
@@ -110,7 +114,7 @@ body=$(cat <<EOF
|
|||||||
Automated bump of \`dev-util/${PN}\` from ${current} to ${latest}.
|
Automated bump of \`dev-util/${PN}\` from ${current} to ${latest}.
|
||||||
|
|
||||||
- Upstream release: https://gitea.com/gitea/runner/releases/tag/v${latest}
|
- Upstream release: https://gitea.com/gitea/runner/releases/tag/v${latest}
|
||||||
- Vendor tarball: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${vendor_tag}
|
- Vendor tarball: https://git.azy.dev/${GITHUB_REPOSITORY}/releases/tag/${vendor_tag}
|
||||||
|
|
||||||
Review checklist:
|
Review checklist:
|
||||||
- [ ] LICENSE still covers all vendored module licenses (\`go-licenses report ./...\`)
|
- [ ] LICENSE still covers all vendored module licenses (\`go-licenses report ./...\`)
|
||||||
|
|||||||
Reference in New Issue
Block a user