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. 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/.github/workflows/12-0.matrix.yaml b/.github/workflows/12-0.matrix.yaml new file mode 100644 index 0000000..bebf31c --- /dev/null +++ b/.github/workflows/12-0.matrix.yaml @@ -0,0 +1,20 @@ +name: Using_Matrix +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 diff --git a/README.md b/README.md index e139ae0..0a73ef3 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) @@ -25,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