Skip to content

Commit

Permalink
Use github.ref instead of github.ref_name (#50)
Browse files Browse the repository at this point in the history
* Use github.ref instead of github.ref_name

* Use conditional instead
  • Loading branch information
robwittman authored Sep 20, 2023
1 parent ac605bc commit f153d07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
task python:base:copy-files IDENTIFIER=${{ matrix.identifier }} NBL_PYTHON_VERSION=${{ matrix.version }}
fi
task python:noteable:copy-files IDENTIFIER=${{ matrix.identifier }} NBL_PYTHON_VERSION=${{ matrix.version }}
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- uses: docker/login-action@v2
with:
registry: ghcr.io
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
repo-token: ${{ github.token }}
- run: |
task r:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- uses: docker/login-action@v2
with:
registry: ghcr.io
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
repo-token: ${{ github.token }}
- run: |
task rust:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- uses: docker/login-action@v2
with:
registry: ghcr.io
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
repo-token: ${{ github.token }}
- run: |
task deno:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
- uses: docker/login-action@v2
with:
registry: ghcr.io
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.2] - 2023-09-20
### Fixed
- Fixed variable generation on release pipelines

## [0.0.1] - 2023-09-20
### Added
- Added automatic release creation via CHANGELOG
2 changes: 1 addition & 1 deletion scripts/set-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

# If a release, we use the tag, otherwise we use the commit SHA
if [[ "${EVENT}" == "release" ]]; then
echo "TAG=${GITHUB_REF}" >> "${GITHUB_ENV}"
echo "TAG=${REF}" >> "${GITHUB_ENV}"
else
echo "TAG=${GITHUB_SHA}" >> "${GITHUB_ENV}"
fi
Expand Down

0 comments on commit f153d07

Please sign in to comment.