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