-
Notifications
You must be signed in to change notification settings - Fork 63
31 lines (30 loc) · 1.14 KB
/
release-published.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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" }}'