55 lines · yaml
1name: Test Unprivileged Download Artifact Action2 3permissions:4 contents: read5 6on:7 push:8 branches:9 - main10 paths:11 - .github/workflows/test-unprivileged-download-artifact.yml12 - '.github/workflows/unprivileged-download-artifact/**'13 pull_request:14 paths:15 - .github/workflows/test-unprivileged-download-artifact.yml16 - '.github/workflows/unprivileged-download-artifact/**'17 18jobs:19 upload-test-artifact:20 name: Upload Test Artifact21 if: github.repository_owner == 'llvm'22 runs-on: ubuntu-24.0423 steps:24 - name: Create Test File25 run: |26 echo "test" > comment27 - name: Upload Test File28 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.029 with:30 name: workflow-args31 path: |32 comment33 34 test-download:35 name: Test Unprivileged Download Artifact36 if: github.repository_owner == 'llvm'37 runs-on: ubuntu-24.0438 needs: [ upload-test-artifact ]39 steps:40 - name: Checkout LLVM41 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.042 with:43 sparse-checkout: |44 .github/workflows/unprivileged-download-artifact/action.yml45 - name: Download Artifact46 uses: ./.github/workflows/unprivileged-download-artifact47 id: download-artifact48 with:49 run-id: ${{ github.run_id }}50 artifact-name: workflow-args51 - name: Assert That Contents are the Same52 run: |53 cat comment54 [[ "$(cat comment)" == "test" ]]55