Skip to content

Commit

Permalink
Refactor GitHub Actions workflow to use environment variable for bran…
Browse files Browse the repository at this point in the history
…ch name
  • Loading branch information
mjanez committed Sep 24, 2024
1 parent f1d5912 commit ef26520
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
- name: Extract tag version from branch name
id: extract_tag_version
run: |
if [ "${{ github.head_ref }}" = "master" ]; then
if [ "${{ env.BRANCH }}" = "master" ]; then
echo "VERSION=master" >> $GITHUB_ENV
else
echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV
echo "VERSION=$(echo ${{ env.BRANCH }} | sed 's/^ckan-//')" >> $GITHUB_ENV
fi
- name: Extract Docker metadata
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- name: Extract tag version from branch name
id: extract_tag_version
run: |
if [ "${{ github.head_ref }}" = "master" ]; then
if [ "${{ env.BRANCH }}" = "master" ]; then
echo "VERSION=master" >> $GITHUB_ENV
else
echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV
echo "VERSION=$(echo ${{ env.BRANCH }} | sed 's/^ckan-//')" >> $GITHUB_ENV
fi
- name: Extract Docker metadata
Expand Down

0 comments on commit ef26520

Please sign in to comment.