From 9ba2a178bd988c651a7b7f3b79656f6d5fd9ea47 Mon Sep 17 00:00:00 2001 From: Will Topping Date: Mon, 22 Dec 2025 23:37:26 -0600 Subject: [PATCH 1/2] Add GitHub Actions workflow with manual approval --- .github/workflows/example.yml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/example.yml diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 0000000..367bbaf --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,53 @@ +name: Example Manual Approval + +on: + push: + branches: + - example + +jobs: + # First job - runs automatically + build: + runs-on: ubuntu-latest + outputs: + message: ${{ steps.create.outputs.message }} + + steps: + - name: Create a file + id: create + run: | + echo "Hello from build job" > myfile.txt + cat myfile.txt + + # Set output for next job + MESSAGE="Build completed at $(date)" + echo "message=$MESSAGE" >> $GITHUB_OUTPUT + echo "Created message: $MESSAGE" + + - name: Upload file + uses: actions/upload-artifact@v4 + with: + name: my-artifact + path: myfile.txt + + # Second job - waits for manual approval + deploy: + runs-on: ubuntu-latest + needs: build + environment: manual-approval # This creates the manual pause + + steps: + - name: Download the file + uses: actions/download-artifact@v4 + with: + name: my-artifact + + - name: Echo the file contents + run: | + echo "===== File Contents =====" + cat myfile.txt + echo "========================" + + echo "Message from build job: ${{ needs.build.outputs.message }}" + + echo "This only runs after manual approval!" From 0a40314e9fe992d5b25989b977f84bede8ba5d46 Mon Sep 17 00:00:00 2001 From: Will Topping Date: Mon, 22 Dec 2025 23:41:53 -0600 Subject: [PATCH 2/2] Add 'otherExample' branch to workflow trigger --- .github/workflows/example.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 367bbaf..3c6c979 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -4,6 +4,7 @@ on: push: branches: - example + - otherExample jobs: # First job - runs automatically