Skip to content

Update gates for TN428 #32

Update gates for TN428

Update gates for TN428 #32

name: Validate and Merge Popcycle DBs from Pull Request
on:
pull_request:
jobs:
list-db-files:
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge
run: gh pr merge --auto --merge "$PR_URL"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PR_URL: ${{github.event.pull_request.html_url}}
- uses: actions/checkout@v3
- name: Save list database files in this PR
run: |
gh pr view "$PR_NUMBER" --json files --jq '.files[] | .path | select(endswith(".db"))' > db-files.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
- name: Print db files in this PR
run: cat db-files.txt
- name: Upload list of db files in this PR
uses: actions/upload-artifact@v3
with:
name: db-files-list
path: db-files.txt
- run: echo "🍏 This job's status is ${{ job.status }}."
validate-db-files:
runs-on: ubuntu-latest
needs: list-db-files
container: ctberthiaume/popcycle:4.19.5
steps:
- uses: actions/checkout@v3
- name: Download list of db files in this PR
uses: actions/download-artifact@v3
with:
name: db-files-list
- name: Run validation script
run: ${GITHUB_WORKSPACE}/.github/workflows/validate-dbs-wrapper.sh db-files.txt
shell: bash
- run: echo "🍏 This job's status is ${{ job.status }}."