From 85ba963bf295eac67844c2226d2e1398b8feb48d Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 27 Nov 2023 15:24:44 +0100 Subject: [PATCH] Building package only if it's tagged. --- .github/workflows/build_pkg.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_pkg.yml b/.github/workflows/build_pkg.yml index dfe3c45..fa54f40 100644 --- a/.github/workflows/build_pkg.yml +++ b/.github/workflows/build_pkg.yml @@ -32,6 +32,10 @@ on: message: type: string default: "" + +env: + GH_TOKEN: ${{ github.token }} + jobs: source: name: source package @@ -71,7 +75,7 @@ jobs: GITHUB_REF_NAME: ${{ github.ref_name }} run: | version="" - [ "$GITHUB_REF_TYPE" == "tag" ] && version=${GITHUB_REF_NAME#*/} + [ "$GITHUB_REF_TYPE" == "tag" ] && version=${GITHUB_REF_NAME#*/} || gh run cancel ${{ github.run_id }} pkg="$(podman run \ --rm \ --mount="type=bind,src=$PWD/${GITHUB_ACTION_PATH}/container/bin,dst=/usr/local/sbin,ro" \