Skip to content

Commit

Permalink
create-final-bosh-release-on-commits.yml: skip gh-release update when…
Browse files Browse the repository at this point in the history
… noop

skip gh-release update when no bosh release was recreated.
- Otherwise, the actions fails to properly regenerate the release notes
- and this saves resources
  • Loading branch information
gberche-orange committed Jan 5, 2024
1 parent 4318d30 commit 9ddca9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/create-final-bosh-release-on-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ jobs:
echo "No sha1 found in diff in ${RELEASE_FILE_NAME}. No blob were modified. Skipping the git push"
ls -al ${RELEASE_FILE_NAME}
cat ${RELEASE_FILE_NAME}
NEED_GITHUB_RELEASE="false"
else
echo "pushing changes to git repository"
Expand All @@ -174,17 +175,20 @@ jobs:
# Push the tag
git push ${remote_repo} ${version} --force
NEED_GITHUB_RELEASE="true"
fi
# make asset readable outside docker image
chmod 644 ${name}-${version}.tgz
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
echo "file=${name}-${version}.tgz" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "file=${name}-${version}.tgz" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "need_gh_release=${NEED_GITHUB_RELEASE}" >> $GITHUB_OUTPUT
# see https://github.com/ncipollo/release-action
- name: create github release
id: create-github-release
if: {{ steps.create-bosh-release.outputs.need_gh_release == 'true' }}
uses: ncipollo/[email protected]
with:
tag: ${{ steps.create-bosh-release.outputs.version }}
Expand Down

0 comments on commit 9ddca9b

Please sign in to comment.