Skip to content

Commit

Permalink
Building package only if it's tagged.
Browse files Browse the repository at this point in the history
  • Loading branch information
alee-ntap committed Nov 27, 2023
1 parent 8df8887 commit 98c3852
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
message:
type: string
default: ""

env:
GH_TOKEN: ${{ github.token }}

jobs:
source:
name: source package
Expand All @@ -51,6 +55,20 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
path: input
- name: check if HEAD contains tag
id: tagged
run: |
cd input
find
TAG=$(git tag --points-at HEAD)
git tag --points-at HEAD
if [[ -n $TAG ]]; then
echo "Commit is tagged. Building package with Tag: $TAG"
cd ..
else
echo "Commit is not tagged."
gh run cancel ${{ github.run_id }}
fi
- name: pull build container
run: podman pull "${{ inputs.build_container }}:amd64"
- name: fetch dependencies
Expand Down

0 comments on commit 98c3852

Please sign in to comment.