Skip to content

Merge pull request #147 from plus3it/dependabot/docker/amazonlinux-2.… #28

Merge pull request #147 from plus3it/dependabot/docker/amazonlinux-2.…

Merge pull request #147 from plus3it/dependabot/docker/amazonlinux-2.… #28

Workflow file for this run

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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
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 }}