Repository navigation
ntpsec #7777
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 Visibility 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') | |
| SUCCESSFUL=$(gh api \ | |
| "repos/${{ github.repository }}/actions/workflows/${WORKFLOW_ID}/runs?head_sha=${HEAD_SHA}&per_page=10" \ | |
| --jq "[.workflow_runs[] | select(.conclusion == \"success\" and .id != ${{ github.run_id }})] | length") | |
| if [ "${SUCCESSFUL:-0}" -gt "0" ]; then | |
| echo "Workflow already passed for ${HEAD_SHA}, skipping." | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| pentoo-visibility-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: Visibility Check | |
| run: | | |
| sudo docker build --progress=plain . -f scripts/qa/Dockerfile.visibility |