From 9c98d55d364230ff50563b75ea3b873fe16c8088 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:37:37 -0500 Subject: [PATCH 1/9] 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 365af6bc2ef3d2b9d30769bd2ad48d3197df4ac9 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:42:26 -0500 Subject: [PATCH 2/9] move to save for later --- .github/workflows/greetings.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/greetings.yml 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" From ff4da3d8688ff8c35f541f6d9e4605d60bd86803 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:00:27 -0500 Subject: [PATCH 3/9] add schedule workfloow --- .github/workflows/.keep | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/.keep b/.github/workflows/.keep index e69de29bb..0ca62f606 100644 --- a/.github/workflows/.keep +++ b/.github/workflows/.keep @@ -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 7164e265b273e2b295d64a052494d28142a61a90 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:04:57 -0500 Subject: [PATCH 4/9] trigger wofklow dev --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 43fc9143d..907b2e127 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Github-Examples A repo containing GitHub for programmatic examples + \ No newline at end of file From 5de70a54240e1f234b85727a2e1cc2805effe9da Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:31:41 -0500 Subject: [PATCH 5/9] 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 bd0b5556feffcd84876c9d83773251def52b5573 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:32:45 -0500 Subject: [PATCH 6/9] conditional modified --- .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..903582df3 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 == 'ExamProCo/Github-Examples' runs-on: ubuntu-latest steps: - name: "Hello World" From 274be934378bd181189ff136e2aeb96719523bd2 Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:37:51 -0500 Subject: [PATCH 7/9] attempt context workflow --- .github/workflows/context.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/context.yaml diff --git a/.github/workflows/context.yaml b/.github/workflows/context.yaml new file mode 100644 index 000000000..c8fa9f1ce --- /dev/null +++ b/.github/workflows/context.yaml @@ -0,0 +1,12 @@ +name: Context Examples + +on: ["push"] + +jobs: + my-context: + runs-on: ubuntu-latest + steps: + - name: "my step" + run: echo "Hello! $MY_ACTION" + env: + MY_ACTION: ${{ github.action }} From ca246c361838b7cec119f341ffd587f8144f9d7f Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:40:53 -0500 Subject: [PATCH 8/9] actor --- .github/workflows/context.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/context.yaml b/.github/workflows/context.yaml index c8fa9f1ce..ed572e51e 100644 --- a/.github/workflows/context.yaml +++ b/.github/workflows/context.yaml @@ -7,6 +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}} From d02e9b8b1474cfdc291948ae31c186cfbc07e0cf Mon Sep 17 00:00:00 2001 From: Serafin Patino <107152515+spatino1234@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:47:02 -0500 Subject: [PATCH 9/9] hello --- .github/workflows/jobs.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/jobs.yaml diff --git a/.github/workflows/jobs.yaml b/.github/workflows/jobs.yaml new file mode 100644 index 000000000..dedeae03b --- /dev/null +++ b/.github/workflows/jobs.yaml @@ -0,0 +1,16 @@ +name: "dependant jobs example" + +on: [push] + +jobs: + job2: + runs-on: ubuntu-latest + needs: job1 + steps: + - name: stepA + run: echo "world" + job1: + runs-on: ubuntu-latest + steps: + - name: stepB + run: echo "hello" \ No newline at end of file