From 75e2bd1effb7febd21b3d89d99b87e92203ef37c Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:28:13 +0000 Subject: [PATCH 01/46] Create greetings.yml --- .github/workflows/greetings.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 000000000..46774343e --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Message that will be displayed on users' first issue" + pr-message: "Message that will be displayed on users' first pull request" From 570725d5f404acb8569c268c26f359e0519e0252 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:16:57 +0000 Subject: [PATCH 02/46] added cron every 2 minutes --- .github/workflows/schedule.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/schedule.yml diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 000000000..9ae566778 --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,10 @@ +on: + schedule: + - cron: '*/2 * * * *' + +jobs: + hello_world: + runs-on: ubuntu-latest + steps: + - name: Echo current time + run: echo "The current server time is $(date)" From 592b06bdf28adc367a9db332384967bce7520535 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:31:12 +0000 Subject: [PATCH 03/46] Update custom-action.yml --- .github/workflows/custom-action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 7a87b53f1..28e69744c 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,5 +1,6 @@ on: [push] +name: run every 2 minutes jobs: my-job: runs-on: ubuntu-latest @@ -12,4 +13,4 @@ jobs: name: 'Brown' # Use the output from the `hello` step - name: Get the Output - run: echo "The time was ${{ steps.hello.outputs.greeting }}" \ No newline at end of file + run: echo "The time was ${{ steps.hello.outputs.greeting }}" From 8306c2e2173a4fc7be6a1c19b8b3df83a20c7797 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:31:33 +0000 Subject: [PATCH 04/46] Update custom-action.yml --- .github/workflows/custom-action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 28e69744c..09e458df0 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,6 +1,7 @@ +name: run every 2 minutes + on: [push] -name: run every 2 minutes jobs: my-job: runs-on: ubuntu-latest From 37d7fcee899e63c27619a7723fd56dbc430c86b6 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:34:55 +0000 Subject: [PATCH 05/46] Update custom-action.yml --- .github/workflows/custom-action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 09e458df0..701591fde 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,5 +1,3 @@ -name: run every 2 minutes - on: [push] jobs: From e9f4fc4e2f67f1fd32065f7968e57c51066bb999 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:39:56 +0000 Subject: [PATCH 06/46] Update schedule.yml --- .github/workflows/schedule.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 9ae566778..e34b2c508 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -1,6 +1,7 @@ +name: run job every minute on: schedule: - - cron: '*/2 * * * *' + - cron: '*/1 * * * *' jobs: hello_world: From e9732d2efa1e04dd9d28a0348a0c49761f7f2ec2 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:45:58 +0000 Subject: [PATCH 07/46] Update schedule.yml --- .github/workflows/schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index e34b2c508..5b9ae080b 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -1,7 +1,7 @@ name: run job every minute on: schedule: - - cron: '*/1 * * * *' + - cron: '*/5 * * * *' jobs: hello_world: From 366c169986fdb411ad720d7b6e5f7df1cd51a20d Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:50:23 +0000 Subject: [PATCH 08/46] Update custom-action.yml --- .github/workflows/custom-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 701591fde..d71b8b806 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,4 +1,4 @@ -on: [push] +on: [pull_request_target] jobs: my-job: From 6ec96cad8b4f7ede68b48c0c2a67254e3818a1fc Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:52:38 +0000 Subject: [PATCH 09/46] Update schedule.yml --- .github/workflows/schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 5b9ae080b..cd3b7aa8b 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -1,4 +1,4 @@ -name: run job every minute +name: Run job every 5 minutes on: schedule: - cron: '*/5 * * * *' From 81bf08533b7ca3f42d24ead1dae9edf93c1aaba7 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:41:19 +0000 Subject: [PATCH 10/46] Update schedule.yml --- .github/workflows/schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index cd3b7aa8b..64f6c43f2 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -1,7 +1,7 @@ name: Run job every 5 minutes on: schedule: - - cron: '*/5 * * * *' + # - cron: '*/5 * * * *' jobs: hello_world: From c8120d3002b171c9eb4620356b9b2174d3bfb714 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:41:58 +0000 Subject: [PATCH 11/46] Update schedule.yml --- .github/workflows/schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 64f6c43f2..cd3b7aa8b 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -1,7 +1,7 @@ name: Run job every 5 minutes on: schedule: - # - cron: '*/5 * * * *' + - cron: '*/5 * * * *' jobs: hello_world: From 0ffd413982ca0bfd0b165b9918726b18fc0fe471 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Sat, 11 Jan 2025 17:10:06 +0000 Subject: [PATCH 12/46] multi-event template --- .github/workflows/multi-event.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/multi-event.yml diff --git a/.github/workflows/multi-event.yml b/.github/workflows/multi-event.yml new file mode 100644 index 000000000..a3275be38 --- /dev/null +++ b/.github/workflows/multi-event.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + +jobs: + hello_world: + runs-on: ubuntu-latest + steps: + - name: "Echo Basic Information" + run: | + echo "REF: $GITHUB_REF" + echo "Job ID: $GITHUB_JOB" + echo "Action: $GITHUB_ACTION" + echo "Actor: $GITHUB_ACTOR" \ No newline at end of file From 0e2387eb439e010413c24095ce79a692fef603dd Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Sat, 11 Jan 2025 17:13:19 +0000 Subject: [PATCH 13/46] trigger workflow on dev --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 43fc9143d..99555a5c9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Github-Examples A repo containing GitHub for programmatic examples +example edit \ No newline at end of file From 8fe915fa9175fa2eb9f673a508cbc01745c435e3 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:02:07 +0000 Subject: [PATCH 14/46] manual wokflow --- .github/workflows/manual.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 000000000..081adf3a6 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,32 @@ +name: Manual Trigger with Params + +on: + workflow_dispatch: + inputs: + name: + description: 'Name of the person to greet' + required: true + type: string + greeting: + description: 'Type of greeting' + required: true + type: string + data: + description: 'Base64 encoded content of a file' + required: false + type: string + +jobs: + greet: + runs-on: ubuntu-latest + steps: + - name: Decode File Content + run: | + echo "${{ inputs.data }}" | base64 --decode > ./decoded_file.txt + - name: Display Greeting + run: | + echo "${{ inputs.greeting }}, ${{ inputs.name }}!" + - name: Display File Content + run: | + echo "Contents of the file:" + cat ./decoded_file.txt \ No newline at end of file From 8a0e73a1edd7e4f40daa52de0d850dd4e5e1b9bf Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:06:37 +0000 Subject: [PATCH 15/46] add webhook --- .github/workflows/webhook.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/webhook.yml diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml new file mode 100644 index 000000000..dbdf1e47d --- /dev/null +++ b/.github/workflows/webhook.yml @@ -0,0 +1,15 @@ +name: "Webhook Event example" + +on: + repository_dispatch: + types: + - webhook + +jobs: + respond-to-dispatch: + runs-on: ubuntu-latest + steps: + - name Checkout repo + uses: actions/checkout@v2 + - name: Run a script + run: echo "Event of type: $GITHUB_EVENT_NAME" From f00260cb023ecba02d59508c53917d10d47ee1d2 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:10:47 +0000 Subject: [PATCH 16/46] add custom webhook --- .github/workflows/webhook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index dbdf1e47d..f657be2e6 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -3,7 +3,7 @@ name: "Webhook Event example" on: repository_dispatch: types: - - webhook + - custom_webhook jobs: respond-to-dispatch: From 8de736cdcd60555565350ae425e93b40daacafec Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:13:31 +0000 Subject: [PATCH 17/46] fixed syntax --- .github/workflows/webhook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index f657be2e6..a9919277c 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -9,7 +9,7 @@ jobs: respond-to-dispatch: runs-on: ubuntu-latest steps: - - name Checkout repo + - name: Checkout repo uses: actions/checkout@v2 - name: Run a script run: echo "Event of type: $GITHUB_EVENT_NAME" From ca872bef8dae30f0ae2d92370e84f79cccd79777 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:14:26 +0000 Subject: [PATCH 18/46] more fixes --- .github/workflows/webhook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index a9919277c..b200d991f 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -3,7 +3,7 @@ name: "Webhook Event example" on: repository_dispatch: types: - - custom_webhook + - webhook jobs: respond-to-dispatch: From 41935cb92ad08520a1ec44b0154f8db615df6fd9 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:29:02 +0000 Subject: [PATCH 19/46] try again --- .github/workflows/webhook.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index b200d991f..3d94d654a 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -7,9 +7,5 @@ on: jobs: respond-to-dispatch: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v2 - name: Run a script run: echo "Event of type: $GITHUB_EVENT_NAME" From 9f6163ef8080482226741a3dfe43f9a661e69bc0 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:00:18 +0000 Subject: [PATCH 20/46] try again --- .github/workflows/webhook.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index 3d94d654a..08489e118 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -7,5 +7,7 @@ on: jobs: respond-to-dispatch: + runs-on: ubuntu-latest + steps: - name: Run a script run: echo "Event of type: $GITHUB_EVENT_NAME" From f9850a567dcc23188c0b1b5a978f28a39ed0dcf3 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:12:51 +0000 Subject: [PATCH 21/46] try again x2 --- .github/workflows/webhook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index 08489e118..22ddb6e51 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -10,4 +10,4 @@ jobs: runs-on: ubuntu-latest steps: - name: Run a script - run: echo "Event of type: $GITHUB_EVENT_NAME" + run: 'echo "Event of type: $GITHUB_EVENT_NAME"'' From be50df97ce930e86f3746033e9252943629afebe Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:13:50 +0000 Subject: [PATCH 22/46] please work --- .github/workflows/webhook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index 22ddb6e51..87393485c 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -10,4 +10,4 @@ jobs: runs-on: ubuntu-latest steps: - name: Run a script - run: 'echo "Event of type: $GITHUB_EVENT_NAME"'' + run: 'echo "Event of type: $GITHUB_EVENT_NAME"' From bfd98b1da97b90ff002081de6cf5e8e0e3a1ca5c Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:18:02 +0000 Subject: [PATCH 23/46] Create dispatches --- dispatches | 1 + 1 file changed, 1 insertion(+) create mode 100644 dispatches diff --git a/dispatches b/dispatches new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/dispatches @@ -0,0 +1 @@ + From 61d925eaa0382253626055832a4b46e5855537f2 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:08:03 +0000 Subject: [PATCH 24/46] conditional --- .github/workflows/conditional.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/conditional.yml diff --git a/.github/workflows/conditional.yml b/.github/workflows/conditional.yml new file mode 100644 index 000000000..87b48c2f9 --- /dev/null +++ b/.github/workflows/conditional.yml @@ -0,0 +1,14 @@ +name: example-workflow +on: [push] +jobs: + hello-world: + if: github.repository == 'octo-org/octo-repo-prod' + runs-on: ubuntu-latest + steps: + - name: "Hello World" + run: echo "Hello World!" + goodbye-moon: + runs-on: ubuntu-latest + steps: + - name: "Goodbye Moon" + run: echo "Goodbye Moon!" \ No newline at end of file From 2d8af2b8e66d44fcf8e711e29a7595ebb3e156e4 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:11:53 +0000 Subject: [PATCH 25/46] trigger other condition --- .github/workflows/conditional.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conditional.yml b/.github/workflows/conditional.yml index 87b48c2f9..30b512720 100644 --- a/.github/workflows/conditional.yml +++ b/.github/workflows/conditional.yml @@ -2,7 +2,7 @@ name: example-workflow on: [push] jobs: hello-world: - if: github.repository == 'octo-org/octo-repo-prod' + if: github.repository == 'AnEpicDoor/Github-Examples' runs-on: ubuntu-latest steps: - name: "Hello World" From a91b5687e5ba38a77905059ab57960746b2d003a Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:17:42 +0000 Subject: [PATCH 26/46] 1 --- .github/workflows/expression-functions.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/expression-functions.yml diff --git a/.github/workflows/expression-functions.yml b/.github/workflows/expression-functions.yml new file mode 100644 index 000000000..ad3cf229d --- /dev/null +++ b/.github/workflows/expression-functions.yml @@ -0,0 +1,35 @@ +name: Expression Functions Demo + +on: + push: + branches: + - main + +jobs: + expression-functions: + runs-on: ubuntu-latest + steps: + - name: Check if string contains substring + if: contains('Hello world', 'llo') + run: echo "The string contains the substring." + - name: Check if string starts with + if: startsWith('Hello world', 'He') + run: echo "The string starts with 'He'." + - name: Check if string ends with + if: endsWith('Hello world', 'ld') + run: echo "The string ends with 'ld'." + - name: Format and echo string + run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} + - name: Join issue labels + if: github.event_name == 'issues' + run: echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}" + - name: Convert job context to JSON + run: echo "Job context in JSON: ${{ toJSON(github.job) }}" + - name: Parse JSON string + run: echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}" + - name: Hash files + run: echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }} + - name: The job has succeeded + if: ${{ success() }} + - name: The job has failed + if: ${{ failure() }} \ No newline at end of file From b10d0b3d0a15395e4c3dd3448274be136ef7ec0a Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:20:10 +0000 Subject: [PATCH 27/46] 1 --- .github/workflows/expression-functions.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/expression-functions.yml b/.github/workflows/expression-functions.yml index ad3cf229d..4c9d09117 100644 --- a/.github/workflows/expression-functions.yml +++ b/.github/workflows/expression-functions.yml @@ -20,9 +20,6 @@ jobs: run: echo "The string ends with 'ld'." - name: Format and echo string run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} - - name: Join issue labels - if: github.event_name == 'issues' - run: echo "Issue labels: ${{ join(github.event.issue.labels.*.name, ', ') }}" - name: Convert job context to JSON run: echo "Job context in JSON: ${{ toJSON(github.job) }}" - name: Parse JSON string From 075ff8d91ef664ee605d0361fbe8a1c4f3f46ec3 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:30:38 +0000 Subject: [PATCH 28/46] 1 --- .github/workflows/expression-functions.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/expression-functions.yml b/.github/workflows/expression-functions.yml index 4c9d09117..6dae9c14b 100644 --- a/.github/workflows/expression-functions.yml +++ b/.github/workflows/expression-functions.yml @@ -21,12 +21,14 @@ jobs: - name: Format and echo string run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} - name: Convert job context to JSON - run: echo "Job context in JSON: ${{ toJSON(github.job) }}" + run: "echo \"Job context in JSON: ${{ toJSON(github.job) }}\"" - name: Parse JSON string - run: echo "Parsed JSON: ${{ fromJSON('{"hello":"world"}').hello }}" + run: "echo \"Parsed JSON: ${{ fromJSON('{\"hello\":\"world\"}').hello }}\"" - name: Hash files - run: echo "Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }} + run: "echo \"Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}\"" - name: The job has succeeded if: ${{ success() }} + run: echo "Success!" - name: The job has failed - if: ${{ failure() }} \ No newline at end of file + if: ${{ failure() }} + run: echo "Failure!" \ No newline at end of file From dc3f8af9e2ba308cddd9a8e199784edf0d1eb7d3 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:43:37 +0000 Subject: [PATCH 29/46] test runners --- .github/workflows/runner-macos.yml | 30 ++++++++++++++++++++++ .github/workflows/runner-windows.yml | 38 ++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/runner-macos.yml create mode 100644 .github/workflows/runner-windows.yml diff --git a/.github/workflows/runner-macos.yml b/.github/workflows/runner-macos.yml new file mode 100644 index 000000000..6baa5adf6 --- /dev/null +++ b/.github/workflows/runner-macos.yml @@ -0,0 +1,30 @@ +name: macOS Workflow Example + +on: + push: + branches: + - main + +jobs: + build-and-test: + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create Swift File + run: | + echo 'print("Hello from Swift on macOS")' > hello.swift + + - name: Install dependencies + run: | + brew install swiftlint + + - name: Run SwiftLint + run: swiftlint + + - name: Compile and run Swift program + run: | + swiftc hello.swift + ./hello \ No newline at end of file diff --git a/.github/workflows/runner-windows.yml b/.github/workflows/runner-windows.yml new file mode 100644 index 000000000..3b73f2b2e --- /dev/null +++ b/.github/workflows/runner-windows.yml @@ -0,0 +1,38 @@ +name: Windows Workflow Example + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-and-test: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: choco install dotnetcore-sdk + shell: powershell + + - name: Compile and run C# program + run: | + Add-Content -Path "Hello.cs" -Value @" + using System; + public class Hello + { + public static void Main() + { + Console.WriteLine("Hello, Windows from C#"); + } + } + "@ + dotnet new console --force --no-restore + Move-Item -Path "Hello.cs" -Destination "Program.cs" -Force + dotnet run + shell: powershell \ No newline at end of file From 4118af83133de432ab850999a2a5592cdcb1d61d Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:15:37 +0000 Subject: [PATCH 30/46] workflow commands --- .github/workflows/conditional.yml | 14 -------- .github/workflows/custom-action.yml | 15 --------- .github/workflows/expression-functions.yml | 34 ------------------- .github/workflows/greetings.yml | 16 --------- .github/workflows/manual.yml | 32 ------------------ .github/workflows/multi-event.yml | 19 ----------- .github/workflows/runner-macos.yml | 30 ----------------- .github/workflows/runner-windows.yml | 38 ---------------------- .github/workflows/schedule.yml | 11 ------- .github/workflows/webhook.yml | 13 -------- .github/workflows/workflow-commands.yml | 14 ++++++++ 11 files changed, 14 insertions(+), 222 deletions(-) delete mode 100644 .github/workflows/conditional.yml delete mode 100644 .github/workflows/custom-action.yml delete mode 100644 .github/workflows/expression-functions.yml delete mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/manual.yml delete mode 100644 .github/workflows/multi-event.yml delete mode 100644 .github/workflows/runner-macos.yml delete mode 100644 .github/workflows/runner-windows.yml delete mode 100644 .github/workflows/schedule.yml delete mode 100644 .github/workflows/webhook.yml create mode 100644 .github/workflows/workflow-commands.yml diff --git a/.github/workflows/conditional.yml b/.github/workflows/conditional.yml deleted file mode 100644 index 30b512720..000000000 --- a/.github/workflows/conditional.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: example-workflow -on: [push] -jobs: - hello-world: - if: github.repository == 'AnEpicDoor/Github-Examples' - runs-on: ubuntu-latest - steps: - - name: "Hello World" - run: echo "Hello World!" - goodbye-moon: - runs-on: ubuntu-latest - steps: - - name: "Goodbye Moon" - run: echo "Goodbye Moon!" \ No newline at end of file diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml deleted file mode 100644 index d71b8b806..000000000 --- a/.github/workflows/custom-action.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: [pull_request_target] - -jobs: - my-job: - runs-on: ubuntu-latest - name: A job to say hello - steps: - - name: Hello world action step - id: hello - uses: omenking/barsoom@0.0.6 - with: - name: 'Brown' - # Use the output from the `hello` step - - name: Get the Output - run: echo "The time was ${{ steps.hello.outputs.greeting }}" diff --git a/.github/workflows/expression-functions.yml b/.github/workflows/expression-functions.yml deleted file mode 100644 index 6dae9c14b..000000000 --- a/.github/workflows/expression-functions.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Expression Functions Demo - -on: - push: - branches: - - main - -jobs: - expression-functions: - runs-on: ubuntu-latest - steps: - - name: Check if string contains substring - if: contains('Hello world', 'llo') - run: echo "The string contains the substring." - - name: Check if string starts with - if: startsWith('Hello world', 'He') - run: echo "The string starts with 'He'." - - name: Check if string ends with - if: endsWith('Hello world', 'ld') - run: echo "The string ends with 'ld'." - - name: Format and echo string - run: echo ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} - - name: Convert job context to JSON - run: "echo \"Job context in JSON: ${{ toJSON(github.job) }}\"" - - name: Parse JSON string - run: "echo \"Parsed JSON: ${{ fromJSON('{\"hello\":\"world\"}').hello }}\"" - - name: Hash files - run: "echo \"Hash of files: ${{ hashFiles('**/package-lock.json', '**/Gemfile.lock') }}\"" - - name: The job has succeeded - if: ${{ success() }} - run: echo "Success!" - - name: The job has failed - if: ${{ failure() }} - run: echo "Failure!" \ No newline at end of file diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 46774343e..000000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Greetings - -on: [pull_request_target, issues] - -jobs: - greeting: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Message that will be displayed on users' first issue" - pr-message: "Message that will be displayed on users' first pull request" diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml deleted file mode 100644 index 081adf3a6..000000000 --- a/.github/workflows/manual.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Manual Trigger with Params - -on: - workflow_dispatch: - inputs: - name: - description: 'Name of the person to greet' - required: true - type: string - greeting: - description: 'Type of greeting' - required: true - type: string - data: - description: 'Base64 encoded content of a file' - required: false - type: string - -jobs: - greet: - runs-on: ubuntu-latest - steps: - - name: Decode File Content - run: | - echo "${{ inputs.data }}" | base64 --decode > ./decoded_file.txt - - name: Display Greeting - run: | - echo "${{ inputs.greeting }}, ${{ inputs.name }}!" - - name: Display File Content - run: | - echo "Contents of the file:" - cat ./decoded_file.txt \ No newline at end of file diff --git a/.github/workflows/multi-event.yml b/.github/workflows/multi-event.yml deleted file mode 100644 index a3275be38..000000000 --- a/.github/workflows/multi-event.yml +++ /dev/null @@ -1,19 +0,0 @@ -on: - push: - branches: - - main - - dev - pull_request: - branches: - - main - -jobs: - hello_world: - runs-on: ubuntu-latest - steps: - - name: "Echo Basic Information" - run: | - echo "REF: $GITHUB_REF" - echo "Job ID: $GITHUB_JOB" - echo "Action: $GITHUB_ACTION" - echo "Actor: $GITHUB_ACTOR" \ No newline at end of file diff --git a/.github/workflows/runner-macos.yml b/.github/workflows/runner-macos.yml deleted file mode 100644 index 6baa5adf6..000000000 --- a/.github/workflows/runner-macos.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: macOS Workflow Example - -on: - push: - branches: - - main - -jobs: - build-and-test: - runs-on: macos-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Create Swift File - run: | - echo 'print("Hello from Swift on macOS")' > hello.swift - - - name: Install dependencies - run: | - brew install swiftlint - - - name: Run SwiftLint - run: swiftlint - - - name: Compile and run Swift program - run: | - swiftc hello.swift - ./hello \ No newline at end of file diff --git a/.github/workflows/runner-windows.yml b/.github/workflows/runner-windows.yml deleted file mode 100644 index 3b73f2b2e..000000000 --- a/.github/workflows/runner-windows.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Windows Workflow Example - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-and-test: - runs-on: windows-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install dependencies - run: choco install dotnetcore-sdk - shell: powershell - - - name: Compile and run C# program - run: | - Add-Content -Path "Hello.cs" -Value @" - using System; - public class Hello - { - public static void Main() - { - Console.WriteLine("Hello, Windows from C#"); - } - } - "@ - dotnet new console --force --no-restore - Move-Item -Path "Hello.cs" -Destination "Program.cs" -Force - dotnet run - shell: powershell \ No newline at end of file diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml deleted file mode 100644 index cd3b7aa8b..000000000 --- a/.github/workflows/schedule.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Run job every 5 minutes -on: - schedule: - - cron: '*/5 * * * *' - -jobs: - hello_world: - runs-on: ubuntu-latest - steps: - - name: Echo current time - run: echo "The current server time is $(date)" diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml deleted file mode 100644 index 87393485c..000000000 --- a/.github/workflows/webhook.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: "Webhook Event example" - -on: - repository_dispatch: - types: - - webhook - -jobs: - respond-to-dispatch: - runs-on: ubuntu-latest - steps: - - name: Run a script - run: 'echo "Event of type: $GITHUB_EVENT_NAME"' diff --git a/.github/workflows/workflow-commands.yml b/.github/workflows/workflow-commands.yml new file mode 100644 index 000000000..fed5dbe30 --- /dev/null +++ b/.github/workflows/workflow-commands.yml @@ -0,0 +1,14 @@ +name: "Workflow Commands" + +on: ['push'] +jobs: + my-job: + runs-on: ubuntu-latest + steps: + name: "group logging" + run: | + echo: "::group:: My Group Message" + echo: "msg 1" + echo: "msg 2" + echo: "::endgroup::" + \ No newline at end of file From a0749ec218c5a13189281df9c36498b70b19ea64 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:16:59 +0000 Subject: [PATCH 31/46] workflow commands --- .github/workflows/workflow-commands.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow-commands.yml b/.github/workflows/workflow-commands.yml index fed5dbe30..b41a5c3c4 100644 --- a/.github/workflows/workflow-commands.yml +++ b/.github/workflows/workflow-commands.yml @@ -1,6 +1,7 @@ name: "Workflow Commands" on: ['push'] + jobs: my-job: runs-on: ubuntu-latest @@ -11,4 +12,4 @@ jobs: echo: "msg 1" echo: "msg 2" echo: "::endgroup::" - \ No newline at end of file + \ No newline at end of file From ad8b060dcabcfe8bad31360f4998f54fefdf747a Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:17:48 +0000 Subject: [PATCH 32/46] workflow commands --- .github/workflows/workflow-commands.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow-commands.yml b/.github/workflows/workflow-commands.yml index b41a5c3c4..2529548b9 100644 --- a/.github/workflows/workflow-commands.yml +++ b/.github/workflows/workflow-commands.yml @@ -8,8 +8,8 @@ jobs: steps: name: "group logging" run: | - echo: "::group:: My Group Message" - echo: "msg 1" - echo: "msg 2" - echo: "::endgroup::" + echo "::group:: My Group Message" + echo "msg 1" + echo "msg 2" + echo "::endgroup::" \ No newline at end of file From ded803d864954f4d03826978336b7b54e1bb87e5 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:20:09 +0000 Subject: [PATCH 33/46] workflow commands --- .github/workflows/workflow-commands.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow-commands.yml b/.github/workflows/workflow-commands.yml index 2529548b9..f7fe11064 100644 --- a/.github/workflows/workflow-commands.yml +++ b/.github/workflows/workflow-commands.yml @@ -6,10 +6,10 @@ jobs: my-job: runs-on: ubuntu-latest steps: - name: "group logging" - run: | - echo "::group:: My Group Message" - echo "msg 1" - echo "msg 2" - echo "::endgroup::" + - name: "group logging" + run: | + echo "::group::My Group Message" + echo "msg 1" + echo "msg 2" + echo "::endgroup::" \ No newline at end of file From e44edd84f27939908b151214da2bdd70fe2bc49f Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:36:00 +0000 Subject: [PATCH 34/46] worklow commands with my_val --- .github/workflows/workflow-commands.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow-commands.yml b/.github/workflows/workflow-commands.yml index f7fe11064..88772027b 100644 --- a/.github/workflows/workflow-commands.yml +++ b/.github/workflows/workflow-commands.yml @@ -12,4 +12,9 @@ jobs: echo "msg 1" echo "msg 2" echo "::endgroup::" - \ No newline at end of file + - name: "step 1" + run: | + echo "MY_VAL=hello" >> $GITHUB_ENV + - name: "step 2" + run: | + echo $MY_VAL \ No newline at end of file From b7026b14f7b133962dbe461ec0d048e2460275cb Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:39:25 +0000 Subject: [PATCH 35/46] context --- .github/workflows/context.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/context.yml diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml new file mode 100644 index 000000000..db353567a --- /dev/null +++ b/.github/workflows/context.yml @@ -0,0 +1,12 @@ +name: "Context Examples" + +on: ['push'] + +jobs: + my-context: + runs-on: + steps: + - name: "My Step" + run: echo "Hello! $MY_ACTION" + env: + MY_ACTION: ${{github.action}} \ No newline at end of file From 3e9216bb402694f0ab785c49b5255221e0a41f5b Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:42:14 +0000 Subject: [PATCH 36/46] context --- .github/workflows/context.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index db353567a..67d8b5406 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -4,7 +4,7 @@ on: ['push'] jobs: my-context: - runs-on: + runs-on: ubuntu-latest steps: - name: "My Step" run: echo "Hello! $MY_ACTION" From 12fcfeb336db97c0f6665f6f9c13eccba214a35c Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:44:18 +0000 Subject: [PATCH 37/46] context --- .github/workflows/context.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 67d8b5406..42145cdc7 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -5,8 +5,8 @@ on: ['push'] jobs: my-context: runs-on: ubuntu-latest - steps: - - name: "My Step" - run: echo "Hello! $MY_ACTION" - env: - MY_ACTION: ${{github.action}} \ No newline at end of file + steps: + - name: "My Step" + run: echo "Hello! $MY_ACTION" + env: + MY_ACTION: ${{github.action}} \ No newline at end of file From f8d14a728907c8c85f818b59450cdd137fa37918 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:45:18 +0000 Subject: [PATCH 38/46] context --- .github/workflows/context.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 42145cdc7..4ca0eda5d 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -9,4 +9,4 @@ jobs: - name: "My Step" run: echo "Hello! $MY_ACTION" env: - MY_ACTION: ${{github.action}} \ No newline at end of file + MY_ACTION: ${{ github.action }} \ No newline at end of file From c4fc57a33fe755681ba2d083cf9a10307dc2f1f9 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:46:17 +0000 Subject: [PATCH 39/46] context --- .github/workflows/context.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 4ca0eda5d..894077b71 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -9,4 +9,4 @@ jobs: - name: "My Step" run: echo "Hello! $MY_ACTION" env: - MY_ACTION: ${{ github.action }} \ No newline at end of file + MY_ACTION: ${{ github.action }} \ No newline at end of file From 0669ab1b67f2f2f643a406f7b43b3b2f99df7ac9 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:48:25 +0000 Subject: [PATCH 40/46] context actor --- .github/workflows/context.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 894077b71..757e9e63b 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -9,4 +9,5 @@ jobs: - name: "My Step" run: echo "Hello! $MY_ACTION" env: - MY_ACTION: ${{ github.action }} \ No newline at end of file + MY_ACTION: ${{ github.action }} + MY_ACTOR: ${{ github.actor }} \ No newline at end of file From a3dd1aca964980fc00b1e0d2b11aa7af161a32cf Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:50:10 +0000 Subject: [PATCH 41/46] actor --- .github/workflows/context.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 757e9e63b..2c60f4bf0 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -7,7 +7,9 @@ jobs: runs-on: ubuntu-latest steps: - name: "My Step" - run: echo "Hello! $MY_ACTION" + run: | + echo "action $MY_ACTION" + echo "actor $MY_ACTOR" env: MY_ACTION: ${{ github.action }} MY_ACTOR: ${{ github.actor }} \ No newline at end of file From 6216873b0ce1934f3fefd7c442b3879658916681 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:56:42 +0000 Subject: [PATCH 42/46] dependent jobs --- .github/workflows/dependent-jobs.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/dependent-jobs.yml diff --git a/.github/workflows/dependent-jobs.yml b/.github/workflows/dependent-jobs.yml new file mode 100644 index 000000000..7af881ebd --- /dev/null +++ b/.github/workflows/dependent-jobs.yml @@ -0,0 +1,15 @@ +name: "dependent jobs" + +on: ['push'] + +jobs: + job2: + runs-on: ubuntu-latest + needs: job1 + steps: + - name: "step1" + run: echo "World" + job1: + runs-on: ubuntu-latest + - name "step2" + run: echo "Hello" From 47b0e2ec5435373e4c1567f6859a59a02ffaff9f Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:57:33 +0000 Subject: [PATCH 43/46] 2 --- .github/workflows/dependent-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependent-jobs.yml b/.github/workflows/dependent-jobs.yml index 7af881ebd..ebd97da75 100644 --- a/.github/workflows/dependent-jobs.yml +++ b/.github/workflows/dependent-jobs.yml @@ -4,7 +4,7 @@ on: ['push'] jobs: job2: - runs-on: ubuntu-latest + runs-on: ubuntu-latest needs: job1 steps: - name: "step1" From e884c8bf47c69d7a3c0080e6939efec3f622fc84 Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:58:26 +0000 Subject: [PATCH 44/46] 3 --- .github/workflows/dependent-jobs.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependent-jobs.yml b/.github/workflows/dependent-jobs.yml index ebd97da75..4d2dc4095 100644 --- a/.github/workflows/dependent-jobs.yml +++ b/.github/workflows/dependent-jobs.yml @@ -10,6 +10,7 @@ jobs: - name: "step1" run: echo "World" job1: - runs-on: ubuntu-latest - - name "step2" - run: echo "Hello" + runs-on: ubuntu-latest + steps: + - name "step2" + run: echo "Hello" \ No newline at end of file From 4a4ca17c5c9925d8697451ecbe1effe0b1552c3a Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 17:02:00 +0000 Subject: [PATCH 45/46] 4 --- .github/workflows/dependent-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependent-jobs.yml b/.github/workflows/dependent-jobs.yml index 4d2dc4095..233496f47 100644 --- a/.github/workflows/dependent-jobs.yml +++ b/.github/workflows/dependent-jobs.yml @@ -12,5 +12,5 @@ jobs: job1: runs-on: ubuntu-latest steps: - - name "step2" + - name: "step2" run: echo "Hello" \ No newline at end of file From 2390817dbfe6b8ded19ad9b475080bfadf03637e Mon Sep 17 00:00:00 2001 From: AnEpicDoor <121317221+AnEpicDoor@users.noreply.github.com> Date: Tue, 11 Mar 2025 17:03:39 +0000 Subject: [PATCH 46/46] without depends --- .github/workflows/dependent-jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dependent-jobs.yml b/.github/workflows/dependent-jobs.yml index 233496f47..6a4f51aaf 100644 --- a/.github/workflows/dependent-jobs.yml +++ b/.github/workflows/dependent-jobs.yml @@ -5,7 +5,6 @@ on: ['push'] jobs: job2: runs-on: ubuntu-latest - needs: job1 steps: - name: "step1" run: echo "World"