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

added action validation #40

Merged
merged 5 commits into from
Aug 8, 2023
Merged
Changes from 3 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
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,20 @@ jobs:
- uses: actions/checkout@v3.3.0
- name: Check that the image builds
run: docker build . --file Dockerfile
validate-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- name: Validate that action points to main branch
run: |
BRANCH=$(yq '.jobs.review-approvals.steps[0].uses' $FILE_NAME | cut -d "@" -f2)
Bullrich marked this conversation as resolved.
Show resolved Hide resolved
# If the branch is not the main branch
if [ "$BRANCH" != "$MAIN_BRANCH" ]; then
mutantcornholio marked this conversation as resolved.
Show resolved Hide resolved
echo "Action points to $BRANCH. It has to point to $MAIN_BRANCH instead!"
exit 1
fi
env:
FILE_NAME: ".github/workflows/review-bot.yml"
MAIN_BRANCH: "main"

# Todo: Add the rest of the action https://github.com/paritytech/stale-pr-finder/blob/main/.github/workflows/publish.yml
Loading