Workflow file for this run
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: Checks after any release is published | |
on: | |
release: | |
types: ['published'] | |
jobs: | |
validate-github-action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: carvel-dev/setup-action@v1 | |
with: | |
only: imgpkg | |
imgpkg: ${{ github.event.release.tag_name }} | |
- run: | | |
imgpkg version | |
version=`imgpkg version` | |
tag="${{ github.event.release.tag_name }}" | |
tool_version="$(echo $version | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" | |
if [[ "v${tool_version}" == "${tag}" ]]; | |
then | |
echo "Version match with $tag" | |
exit 0 | |
else | |
echo "Versions do not match v$tool_version != $tag" | |
exit 1 | |
fi | |
- run: | | |
curl -X POST https://api.github.com/repos/carvel-dev/release-scripts/dispatches \ | |
-H 'Accept: application/vnd.github.everest-preview+json' \ | |
-u ${{ secrets.carvel_bot_access_token }} \ | |
--data '{"event_type": "imgpkg_released", "client_payload": { "tagName": "${{ github.event.release.tag_name }}", "repo": "${{ github.repository }}", "toolName": "imgpkg" }}' |