From 76e94760a5d07682d8a9a0ab57124246e52d08e2 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build_pkg.yml b/.github/workflows/build_pkg.yml index dfe3c45..93d6871 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 @@ -51,6 +55,9 @@ jobs: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} path: input + - name: check if HEAD contains tag + if: github.ref_type != 'tag' + run: gh run cancel ${{ github.run_id }} - name: pull build container run: podman pull "${{ inputs.build_container }}:amd64" - name: fetch dependencies