From 302bb1b996e702855173060b47be1110ab0d1112 Mon Sep 17 00:00:00 2001 From: Albertino <24717256+Albejr@users.noreply.github.com> Date: Tue, 1 Jul 2025 08:19:51 -0300 Subject: [PATCH 1/4] Update debug message workflow and enhance README with debug badge --- .github/workflows/1-1.debug-message.yaml | 10 ++++++++-- README.md | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/1-1.debug-message.yaml b/.github/workflows/1-1.debug-message.yaml index 4576545..021d49e 100644 --- a/.github/workflows/1-1.debug-message.yaml +++ b/.github/workflows/1-1.debug-message.yaml @@ -6,8 +6,14 @@ on: workflow_dispatch: jobs: - debug: + debug_message_job: runs-on: ubuntu-latest steps: - name: Print debug Step 1 - run: echo '::debug::action successfully debugged' \ No newline at end of file + run: echo "Runner Debug Enabled => ${{ runner.debug }}" #RUNNER_DEBUG + + - name: Print debug Step 2 + run: | + echo "::debug::Debug Message Sample." + echo "::warning::Warning Message Sample." + echo "::error::Error Message Sample." \ No newline at end of file diff --git a/README.md b/README.md index e139ae0..5bf6ba6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # github wf learn + [![Print_Messages](https://github.com/Albejr/github-workflow-learn/actions/workflows/1-0-print-message.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/1-0-print-message.yaml) +[![Debug_Messages](https://github.com/Albejr/github-workflow-learn/actions/workflows/1-1-debug-message.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/1-1-debug-message.yaml) + [![Trigger_Scheduled](https://github.com/Albejr/github-workflow-learn/actions/workflows/2-0-trigger-schedule.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/2-0-trigger-schedule.yaml) [![Action_Checkout](https://github.com/Albejr/github-workflow-learn/actions/workflows/3-0-action-checkout.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/3-0-action-checkout.yaml) From 5881b98c9d1d4fc4ac99273500310cff1cd93567 Mon Sep 17 00:00:00 2001 From: Albertino <24717256+Albejr@users.noreply.github.com> Date: Tue, 1 Jul 2025 10:08:27 -0300 Subject: [PATCH 2/4] Add missing newlines in action.yaml files for consistency --- .github/actions/print-custom-message/action.yaml | 1 + .github/actions/print-messages/action.yaml | 1 + .github/actions/run-sleep/action.yaml | 3 +++ .github/actions/use-shell-script/action.yaml | 1 + 4 files changed, 6 insertions(+) diff --git a/.github/actions/print-custom-message/action.yaml b/.github/actions/print-custom-message/action.yaml index 6fe4a8c..e40686c 100644 --- a/.github/actions/print-custom-message/action.yaml +++ b/.github/actions/print-custom-message/action.yaml @@ -13,4 +13,5 @@ runs: - name: Print Message Step 1 run: echo "Custom input say => ${{ inputs.INPUT_TEXT_1 }}!" shell: bash + # Added bash shell, because it is required in GitHub Actions composite actions while in act it is optional. diff --git a/.github/actions/print-messages/action.yaml b/.github/actions/print-messages/action.yaml index 6068767..b3262a0 100644 --- a/.github/actions/print-messages/action.yaml +++ b/.github/actions/print-messages/action.yaml @@ -6,4 +6,5 @@ runs: - name: Print Message Step 1 run: echo "Hello from Messages Action 01 Step 1" shell: bash + # Added bash shell, because it is required in GitHub Actions composite actions while in act it is optional. diff --git a/.github/actions/run-sleep/action.yaml b/.github/actions/run-sleep/action.yaml index 0e1df3a..149d2ca 100644 --- a/.github/actions/run-sleep/action.yaml +++ b/.github/actions/run-sleep/action.yaml @@ -6,10 +6,13 @@ runs: - name: Sleep Step 1 run: echo "Sleeping for 8 seconds..." shell: bash + - name: Sleep Step 2 run: sleep 8 shell: bash + - name: Sleep Step 3 run: echo "Sleep Action Completed!" shell: bash + # Added bash shell, because it is required in GitHub Actions composite actions while in act it is optional. diff --git a/.github/actions/use-shell-script/action.yaml b/.github/actions/use-shell-script/action.yaml index 1a3f295..17697dc 100644 --- a/.github/actions/use-shell-script/action.yaml +++ b/.github/actions/use-shell-script/action.yaml @@ -14,4 +14,5 @@ runs: chmod +x good-bye.sh ./good-bye.sh shell: bash + # Added bash shell, because it is required in GitHub Actions composite actions while in act it is optional. From 39e9b695a213eb8912d6b6b88c8724410e1f5c98 Mon Sep 17 00:00:00 2001 From: Albertino <24717256+Albejr@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:27:07 -0300 Subject: [PATCH 3/4] Add matrix job workflow configuration for multiple OS and Node.js versions --- .github/workflows/12-0.matrix.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/12-0.matrix.yaml diff --git a/.github/workflows/12-0.matrix.yaml b/.github/workflows/12-0.matrix.yaml new file mode 100644 index 0000000..886f155 --- /dev/null +++ b/.github/workflows/12-0.matrix.yaml @@ -0,0 +1,20 @@ +name: Matrix_Job_Flow +run-name: Matrix Job Flow +description: "This workflow demonstrates a job that runs with a matrix configuration." + +on: + workflow_dispatch: + +jobs: + matrix_job: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node: [14, 16, 18] + steps: + - name: Matrix Job Step 1 + run: | + echo "Running on OS: ${{ matrix.os }} with Node.js version: ${{ matrix.node }}" + node --version + exit 0 \ No newline at end of file From b679e7c9dbc740cbc79bf7b91079140c91377cdb Mon Sep 17 00:00:00 2001 From: Albertino <24717256+Albejr@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:34:32 -0300 Subject: [PATCH 4/4] Rename matrix job workflow and update README to include badge --- .github/workflows/12-0.matrix.yaml | 2 +- README.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/12-0.matrix.yaml b/.github/workflows/12-0.matrix.yaml index 886f155..bebf31c 100644 --- a/.github/workflows/12-0.matrix.yaml +++ b/.github/workflows/12-0.matrix.yaml @@ -1,4 +1,4 @@ -name: Matrix_Job_Flow +name: Using_Matrix run-name: Matrix Job Flow description: "This workflow demonstrates a job that runs with a matrix configuration." diff --git a/README.md b/README.md index 5bf6ba6..0a73ef3 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,6 @@ [![Using_Inputs](https://github.com/Albejr/github-workflow-learn/actions/workflows/8-0-inputs.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/8-0-inputs.yaml) -[![If_Condition](https://github.com/Albejr/github-workflow-learn/actions/workflows/9-0-condition.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/9-0-condition.yaml) \ No newline at end of file +[![If_Condition](https://github.com/Albejr/github-workflow-learn/actions/workflows/9-0-condition.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/9-0-condition.yaml) + +[![Using_Matrix](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml) \ No newline at end of file