ci: allow manual Arch package publish
This commit is contained in:
@@ -8,6 +8,11 @@ name: ci-release
|
|||||||
- "v[0-9]*.[0-9]*.[0-9]*"
|
- "v[0-9]*.[0-9]*.[0-9]*"
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release_tag:
|
||||||
|
description: Existing vX.Y.Z tag to publish to the Arch registry
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -147,11 +152,12 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
publish-arch-package:
|
publish-arch-package:
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
|
||||||
needs: verify
|
needs: verify
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -160,7 +166,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
tag="${GITHUB_REF##*/}"
|
tag="${RELEASE_TAG:-${GITHUB_REF##*/}}"
|
||||||
version="${tag#v}"
|
version="${tag#v}"
|
||||||
test "$version" = "$(tr -d '[:space:]' < VERSION)"
|
test "$version" = "$(tr -d '[:space:]' < VERSION)"
|
||||||
git archive --format=tar.gz --prefix="folderscope-${version}/" HEAD \
|
git archive --format=tar.gz --prefix="folderscope-${version}/" HEAD \
|
||||||
|
|||||||
Reference in New Issue
Block a user