Skip to content

Add package: 2025_Maravall_Lopez_Argentina #66

Add package: 2025_Maravall_Lopez_Argentina

Add package: 2025_Maravall_Lopez_Argentina #66

Workflow file for this run

name: Add PR Labels
on:
pull_request:
branches:
- main
permissions:
issues: write
pull-requests: write
jobs:
check-for-janno-files:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
git diff --name-only origin/${{ github.event.pull_request.base.ref }} > changed_files.txt
if grep -q '\.janno$' changed_files.txt; then
echo "has_janno=true" >> $GITHUB_ENV
else
echo "has_janno=false" >> $GITHUB_ENV
fi
# env:
# GITHUB_TOKEN: ${{ secrets.delphis_bot_org_token }}
- name: Add label if .janno files exist
if: env.has_janno == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
# github_token: ${{ secrets.delphis_bot_org_token }}
labels: "has janno"
validate-janno:
runs-on: ubuntu-latest
needs: check-for-janno-files
if: needs.check-for-janno-files.outputs.has_janno == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Validate janno with trident
run: |
wget https://github.com/poseidon-framework/poseidon-hs/releases/latest/download/trident-conda-linux -O trident
chmod +x trident
for janno_file in $(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '.janno$'); do
echo "Validating: '${janno_file}'"
trident validate --janno ${janno_file}
done
apply-package-labels:
runs-on: ubuntu-latest
## This step should only run when the PRs are started from the main repo, since it requires an authentication token.
if: github.event.pull_request.head.repo.full_name == 'poseidon-framework/minotaur-recipes'
steps:
- name: Apply new package label
uses: actions-ecosystem/action-add-labels@v1
if:
contains(github.event.pull_request.title, 'Add' ) ||
contains(github.event.pull_request.title, 'add' )
with:
token: ${{ secrets.delphis_bot_org_token }}
labels: "new package"
- name: Apply package update label
uses: actions-ecosystem/action-add-labels@v1
if:
contains(github.event.pull_request.title, 'Update' ) ||
contains(github.event.pull_request.title, 'update' )
with:
token: ${{ secrets.delphis_bot_org_token }}
labels: "package update"