From 83a5e2fe9dd95ba4622e3daf78c7ad3bd53ef34e Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 29 May 2024 19:39:58 +0100 Subject: [PATCH] chore: squash workflow, so it shows up in Actions tab commit ede2ece792ae17d4b2dfcdda57370c38f4282263 Author: Kevaundray Wedderburn Date: Wed May 29 19:38:51 2024 +0100 chore: add on-pull-request commit 92ef6c7c9409e70c143a4b4354f95cdeb1097f43 Author: Kevaundray Wedderburn Date: Wed May 29 19:36:05 2024 +0100 chore: checkout experimental branch commit e2438b469f2458b7c3af22dd3bfe79dfe62a601c Author: Kevaundray Wedderburn Date: Wed May 29 19:33:33 2024 +0100 chore: rename file commit 4f616d54c35595b7cbd749739ad8956fa3c03315 Author: Kevaundray Wedderburn Date: Wed May 29 19:32:04 2024 +0100 chore: add initial testing code --- .github/workflows/build-and-upload.yml | 35 +++++++++++++++++++++++++ .github/workflows/download-and-test.yml | 30 +++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/build-and-upload.yml create mode 100644 .github/workflows/download-and-test.yml 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