Merge pull request #203 from plus3it/dependabot/docker/docker-817172683e #40
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
name: Create GitHub Release | |
on: | |
# Run on demand | |
workflow_dispatch: | |
# Run on push to main when amzn2 version is updated | |
push: | |
branches: | |
- main | |
paths: | |
- Dockerfile.amzn2 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882 | |
- name: Test release condition | |
id: release | |
run: | | |
RELEASE=false | |
if make release/test 2> /dev/null; then RELEASE=true; fi | |
echo "condition=${RELEASE}" >> "$GITHUB_OUTPUT" | |
echo "version=$(make release/version)" >> "$GITHUB_OUTPUT" | |
- name: Create release | |
if: steps.release.outputs.condition == 'true' | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | |
with: | |
name: ${{ steps.release.outputs.version }} | |
tag_name: ${{ steps.release.outputs.version }} | |
generate_release_notes: true | |
target_commitish: ${{ env.GITHUB_REF }} | |
token: ${{ secrets.GH_RELEASES_TOKEN }} |