Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA, won. I can't comment from forks... #120

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.