Skip to content

Commit

Permalink
GHA, won. I can't comment from forks... (#120)
Browse files Browse the repository at this point in the history
* GHA, won. I can't comment from forks...

* Rename action
  • Loading branch information
Typositoire authored Mar 28, 2024
1 parent 5d9c7dd commit ae18456
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Check PR
name: Check for version Bump

on:
pull_request:
branches:
- main

jobs:
check:
verify-version-bump:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -58,28 +56,15 @@ jobs:
LAST_TAG="${{ steps.previoustag.outputs.tag }}"
NEW_TAG="v${{ steps.get_version.outputs.version }}"
RESULT=$(ci/assets/checksemver.sh ${NEW_TAG} ${LAST_TAG})
echo "============================================"
if [ "${RESULT}" == "1" ]; then
echo "Version bump found." > comment.txt
echo "Version bump found."
exit 0
elif [ "${RESULT}" == "0" ]; then
echo "Version bump did not happen. ${LAST_TAG} is the same as ${NEW_TAG}" > comment.txt
echo "Version bump did not happen. ${LAST_TAG} is the same as ${NEW_TAG}"
exit 1
else
echo "Version bump did not happen. ${LAST_TAG} is higher than ${NEW_TAG}" > comment.txt
echo "Version bump did not happen. ${LAST_TAG} is higher than ${NEW_TAG}"
exit 1
fi
- name: Upload html diff ⬆️
id: artifact-upload
uses: actions/upload-artifact@v4
with:
name: CommentMsg
path: comment.txt
retention-days: 7
- name: Dispatch information to repository 🗣️
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.TOKENFORCOMMENT }}
repository: typositoire/concourse-helm3-resource
event-type: pr-comment
client-payload: '{"pr_number": "${{ github.event.number }}", "artifact_url": "${{ steps.artifact-upload.outputs.artifact-url }}", "run_id": "${{ github.run_id }}"}'

echo "============================================"
21 changes: 0 additions & 21 deletions .github/workflows/comment.yml

This file was deleted.

0 comments on commit ae18456

Please sign in to comment.