diff --git a/.github/workflows/build-and-upload.yml b/.github/workflows/build-and-upload.yml new file mode 100644 index 00000000..9bf52275 --- /dev/null +++ b/.github/workflows/build-and-upload.yml @@ -0,0 +1,35 @@ +name: Upload Artifacts + +on: + push: + branches: + - kw/ci-release-workflow-revamp + workflow_dispatch: + pull_request: + +jobs: + upload: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: kw/ci-release-workflow-revamp + + - name: Create example.txt + run: echo "This is an example file." > example.txt + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: example-artifact + path: example.txt + + - name: Dispatch to test workflow + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: download-and-test.yml + ref: kw/ci-release-workflow-revamp + inputs: '{"run_id": "${{ github.run_id }}"}' + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/download-and-test.yml b/.github/workflows/download-and-test.yml new file mode 100644 index 00000000..36f3f9d7 --- /dev/null +++ b/.github/workflows/download-and-test.yml @@ -0,0 +1,30 @@ +name: Download and Process + +on: + pull_request: + workflow_dispatch: + inputs: + run_id: + description: 'The run ID of the triggering workflow' + required: true + type: string + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: kw/ci-release-workflow-revamp + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: example-artifact + path: example.txt + run-id: ${{ github.event.inputs.run_id }} + + - name: Display file content + run: cat example.txt