Repository navigation
tokenizers #3730
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pentoo Binpkg Check | |
| on: | |
| schedule: | |
| - cron: "6 * * * *" | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| skip-check: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.check.outputs.skip }} | |
| steps: | |
| - | |
| name: Check if already passed for this commit | |
| id: check | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| HEAD_SHA="${{ github.event.pull_request.head.sha }}" | |
| WORKFLOW_NAME="${{ github.workflow }}" | |
| WORKFLOW_ID=$(gh api "repos/${{ github.repository }}/actions/workflows" | \ | |
| jq -r --arg name "$WORKFLOW_NAME" '.workflows[] | select(.name == $name) | .id') | |
| PARENTS=$(gh api "repos/${{ github.repository }}/commits/${HEAD_SHA}" --jq '.parents[].sha' 2>/dev/null || true) | |
| SUCCESSFUL=0 | |
| for SHA in ${HEAD_SHA} ${PARENTS}; do | |
| COUNT=$(gh api \ | |
| "repos/${{ github.repository }}/actions/workflows/${WORKFLOW_ID}/runs?head_sha=${SHA}&per_page=10" \ | |
| --jq "[.workflow_runs[] | select(.conclusion == \"success\" and .id != ${{ github.run_id }})] | length") | |
| if [ "${COUNT:-0}" -gt "0" ]; then | |
| SUCCESSFUL=1 | |
| break | |
| fi | |
| done | |
| if [ "${SUCCESSFUL}" -gt "0" ]; then | |
| echo "Workflow already passed for a related commit, skipping." | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| pentoo-binpkg-check: | |
| needs: [skip-check] | |
| if: | | |
| always() && | |
| (github.event_name != 'pull_request' || needs.skip-check.outputs.should_skip != 'true') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - | |
| name: List added files | |
| run: git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | |
| - | |
| name: Binpkg Check | |
| run: | | |
| sudo docker build --progress=plain . -f scripts/qa/Dockerfile.binpkg |