Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at lib-types-attrNamesToTrue 58 lines 1.8 kB view raw
1name: Get merge commit 2 3on: 4 pull_request: 5 paths: 6 - .github/workflows/get-merge-commit.yml 7 workflow_call: 8 outputs: 9 mergedSha: 10 description: "The merge commit SHA" 11 value: ${{ jobs.resolve-merge-commit.outputs.mergedSha }} 12 targetSha: 13 description: "The target commit SHA" 14 value: ${{ jobs.resolve-merge-commit.outputs.targetSha }} 15 systems: 16 description: "The supported systems" 17 value: ${{ jobs.resolve-merge-commit.outputs.systems }} 18 19permissions: {} 20 21jobs: 22 resolve-merge-commit: 23 runs-on: ubuntu-24.04-arm 24 outputs: 25 mergedSha: ${{ steps.merged.outputs.mergedSha }} 26 targetSha: ${{ steps.merged.outputs.targetSha }} 27 systems: ${{ steps.systems.outputs.systems }} 28 steps: 29 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 30 with: 31 path: base 32 sparse-checkout: ci 33 34 - name: Check if the PR can be merged and get the test merge commit 35 id: merged 36 env: 37 GH_TOKEN: ${{ github.token }} 38 GH_EVENT: ${{ github.event_name }} 39 run: | 40 case "$GH_EVENT" in 41 push) 42 echo "mergedSha=${{ github.sha }}" >> "$GITHUB_OUTPUT" 43 ;; 44 pull_request*) 45 if commits=$(base/ci/get-merge-commit.sh ${{ github.repository }} ${{ github.event.number }}); then 46 echo -e "Checking the commits:\n$commits" 47 echo "$commits" >> "$GITHUB_OUTPUT" 48 else 49 # Skipping so that no notifications are sent 50 echo "Skipping the rest..." 51 fi 52 ;; 53 esac 54 55 - name: Load supported systems 56 id: systems 57 run: | 58 echo "systems=$(jq -c <base/ci/supportedSystems.json)" >> "$GITHUB_OUTPUT"