From 8f37c1e036fd42d56347578f16eb0a9d9e10f3a2 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Tue, 17 Jun 2025 12:54:59 -0400 Subject: [PATCH 01/11] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index e8540e8..66b9217 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -2,6 +2,11 @@ name: 01-1. GitHub Actions Demo on: workflow_dispatch: workflow_call: + push: + branches: + - main + paths: + - 'labs/**' jobs: Explore-GitHub-Actions: From 77930e04e534aa098ad2f099533126bb908f2788 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Tue, 17 Jun 2025 12:59:43 -0400 Subject: [PATCH 02/11] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 66b9217..d22a749 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -25,3 +25,12 @@ jobs: - run: echo "🍏 This job's status is ${{ job.status }}." - name: Adding markdown run: echo "### Hello world! :rocket:" >> "$GITHUB_STEP_SUMMARY" + # This step uses GitHub's hello-world-javascript-action: https://github.com/actions/hello-world-javascript-action + - name: Hello world + uses: actions/hello-world-javascript-action@main + with: + who-to-greet: "Mona the Octocat" + id: hello + # This step prints an output (time) from the previous step's action. + - name: Echo the greeting's time + run: echo 'The time was ${{ steps.hello.outputs.time }}.' From bb6ca7e33ce86f7a529857cb4f4624a01cbc62ff Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:00:33 -0400 Subject: [PATCH 03/11] Create dummyFile.txt --- labs/dummyFile.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 labs/dummyFile.txt diff --git a/labs/dummyFile.txt b/labs/dummyFile.txt new file mode 100644 index 0000000..530f8d8 --- /dev/null +++ b/labs/dummyFile.txt @@ -0,0 +1 @@ +to trugger workflows From 4f74b1b668783328c51f1cc21c1b4fd0f9643343 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:03:27 -0400 Subject: [PATCH 04/11] Update job-dependencies.yml --- .github/workflows/job-dependencies.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/job-dependencies.yml b/.github/workflows/job-dependencies.yml index e773fe0..541d700 100644 --- a/.github/workflows/job-dependencies.yml +++ b/.github/workflows/job-dependencies.yml @@ -31,3 +31,37 @@ jobs: needs: [fanout1, fanout2] steps: - run: echo "This job will run after fanout1 and fanout2 have finished." + build: + runs-on: windows-latest + steps: + - run: echo "This job will be run in parallel with the initial job." + test: + runs-on: ubuntu-latest + needs: build + steps: + - run: echo "This job will be run after the build job." + ring01: + runs-on: ubuntu-latest + needs: test + steps: + - run: echo "This job will be run after the test job." + ring02: + runs-on: macos-latest + needs: test + steps: + - run: echo "This job will be run after the test job." + ring03: + runs-on: ubuntu-latest + needs: test + steps: + - run: echo "This job will be run after the test job." + ring04: + runs-on: ubuntu-latest + needs: [ring01,ring02,ring03] + steps: + - run: echo "This job will be run after the ring01,ring02,ring03 jobs." + prod: + runs-on: ubuntu-latest + needs: [ring04] + steps: + - run: echo "This job will be run after the ring04 job." From 652fe3e5711bcc6df446ffb597b383e734ec34c4 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:19:21 -0400 Subject: [PATCH 05/11] Update dummyFile.txt --- labs/dummyFile.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labs/dummyFile.txt b/labs/dummyFile.txt index 530f8d8..4665c3c 100644 --- a/labs/dummyFile.txt +++ b/labs/dummyFile.txt @@ -1 +1,3 @@ -to trugger workflows +to trigger workflow + +triggered again From 069dd511b7d6343f2f91a3158f77cb911ea0eb34 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:55:37 -0400 Subject: [PATCH 06/11] Update ci-workflow.yml --- .github/workflows/ci-workflow.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 6a1827e..09def2e 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -23,8 +23,8 @@ jobs: fail-fast: true matrix: # our matrix for testing across node versions and OSs - node-version: [12, 14] - os: [windows-2019, ubuntu-20.04, ubuntu-22.04] + node-version: [12, 14, 16] + os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout @@ -43,7 +43,14 @@ jobs: echo npm test # Add here the upload-artifact action - + - shell: bash + run: | + echo 'Test upload artifact' > output.log + - name: Upload output file + uses: actions/upload-artifact@v4 + with: + name: output-log-file + path: output.log # If both linting and CI succeeds we want to deploy the code to a test environment deploy-test: @@ -58,7 +65,10 @@ jobs: uses: actions/checkout@v4 # Add here the download-artifact step - + - name: Download a single artifact + uses: actions/download-artifact@v4 + with: + name: output-log-file # Placeholder - this step would be some action or run commands that deploys the code - name: Deploy to test env From 413de83595942cfcf77edb89c04be1836bf72753 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:57:37 -0400 Subject: [PATCH 07/11] Update cd-workflow.yml --- .github/workflows/cd-workflow.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-workflow.yml b/.github/workflows/cd-workflow.yml index f8a4660..b57b462 100644 --- a/.github/workflows/cd-workflow.yml +++ b/.github/workflows/cd-workflow.yml @@ -1,9 +1,8 @@ name: 07-2. CD Workflow on: - # push: - # branches: [main] - workflow_dispatch: + push: + branches: [main] env: AZURE_WEBAPP_NAME: your-app-name # set this to your application's name @@ -51,7 +50,10 @@ jobs: steps: # Add here the download-artifact step - + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: node-app - name: Deploy to Prod if: ${{ success() }} From bae5a7e0f4577c245f5fa356fd50e48513948733 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:11:27 -0400 Subject: [PATCH 08/11] Update ci-workflow.yml --- .github/workflows/ci-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 09def2e..e8bc688 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -15,6 +15,7 @@ jobs: # CI job to run a test suite on the code base ci: name: CI + if: ${{ always() }} # We want to test across mutiple OSs, defined by our matrix runs-on: ${{ matrix.os }} needs: lint From efa56b078a7c31737d8c0da9f7beabe9e512ce46 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:19:27 -0400 Subject: [PATCH 09/11] Update ci-workflow.yml --- .github/workflows/ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index e8bc688..3b4a5a2 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -24,7 +24,7 @@ jobs: fail-fast: true matrix: # our matrix for testing across node versions and OSs - node-version: [12, 14, 16] + node-version: [20, 22] os: [macos-latest, windows-latest, ubuntu-latest] steps: From 8cb0dabb58bc91f25301c44546eb6c8db4fa6bc0 Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:25:34 -0400 Subject: [PATCH 10/11] Update ci-workflow.yml slowly debugging workflow! --- .github/workflows/ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 3b4a5a2..eed0399 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -50,7 +50,7 @@ jobs: - name: Upload output file uses: actions/upload-artifact@v4 with: - name: output-log-file + name: output-log-file-${{ matrix.node-version }}-${{ matrix.os }} path: output.log # If both linting and CI succeeds we want to deploy the code to a test environment From 2f76cfd00a6e6c26e49552da4be26b9500360cca Mon Sep 17 00:00:00 2001 From: emmanuelknafo <48259636+emmanuelknafo@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:31:15 -0400 Subject: [PATCH 11/11] Update ci-workflow.yml --- .github/workflows/ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index eed0399..04ce2bf 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -69,7 +69,7 @@ jobs: - name: Download a single artifact uses: actions/download-artifact@v4 with: - name: output-log-file + name: output-log-file-22-ubuntu-latest # default artifact # Placeholder - this step would be some action or run commands that deploys the code - name: Deploy to test env