-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci.yml: Removed shifting tag logic for prereleases (#86)
- Loading branch information
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,14 +184,22 @@ jobs: | |
number_of_commits=$(git rev-list --count ${{ github.event.pull_request.base.sha }}..HEAD) | ||
echo "prerelease=pr${{ github.event.pull_request.number }}-${number_of_commits}" >> $GITHUB_OUTPUT | ||
- name: Shift Prerelease Tag ${{ steps.version.outputs.release }} | ||
# We shift the 'Release' tag along the PR as the spack.yaml will not work without the correct tag in this repostiory. | ||
# NOTE: Regarding the config user.name/user.email, see https://github.com/actions/checkout/pull/1184 | ||
- name: Tag ${{ steps.version.outputs.release }} for SBD Git Resolution | ||
# We create this initial 'Release' tag on the PR as the overall version | ||
# of the deployment (for example, `[email protected]`) will not | ||
# work without the tag in the model repostiory. | ||
run: | | ||
git config user.name ${{ vars.GH_ACTIONS_BOT_GIT_USER_NAME }} | ||
git config user.email ${{ vars.GH_ACTIONS_BOT_GIT_USER_EMAIL }} | ||
git tag ${{ steps.version.outputs.release }} --force | ||
git push --tags --force | ||
if [ ! $(git tag --list "${{ steps.version.outputs.release }}") ]; then | ||
git tag ${{ steps.version.outputs.release }} | ||
git push --tags | ||
echo "::notice::Pushed prerelease ${{ steps.version.outputs.release }} tag on ${{ github.head_ref }}" | ||
else | ||
commit=$(git rev-list -n 1 tags/${{ steps.version.outputs.version }}) | ||
echo "Didn't push prerelease ${{ steps.version.outputs.release }} as one already exists on $commit" | ||
fi | ||
# ----------------------------- | ||
# | PRERELEASE DEPLOYMENT JOB | | ||
|