From 6d5c424cb24fc9fbaa40d8daa4af3adbc062273d Mon Sep 17 00:00:00 2001 From: Joe Allen <166914918+jallenjallen@users.noreply.github.com> Date: Sat, 23 Aug 2025 11:28:12 +0100 Subject: [PATCH 1/4] 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..1ad500862 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Initial Greeting + +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 eb0cb4ba79dbb0e195c8b923bd845f05932bf9e1 Mon Sep 17 00:00:00 2001 From: Joe Allen <166914918+jallenjallen@users.noreply.github.com> Date: Sat, 23 Aug 2025 11:47:10 +0100 Subject: [PATCH 2/4] moved these to save them for later --- .github/workflows/greetings.yml | 16 ---------------- .../templates}/custom-action.yml | 0 github-actions/templates/greetings.yml | 3 +-- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 .github/workflows/greetings.yml rename {.github/workflows => github-actions/templates}/custom-action.yml (100%) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 1ad500862..000000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Initial Greeting - -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/custom-action.yml b/github-actions/templates/custom-action.yml similarity index 100% rename from .github/workflows/custom-action.yml rename to github-actions/templates/custom-action.yml diff --git a/github-actions/templates/greetings.yml b/github-actions/templates/greetings.yml index 996da6bbd..1ad500862 100644 --- a/github-actions/templates/greetings.yml +++ b/github-actions/templates/greetings.yml @@ -1,4 +1,4 @@ -name: Greetings +name: Initial Greeting on: [pull_request_target, issues] @@ -9,7 +9,6 @@ jobs: issues: write pull-requests: write steps: - # https://github.com/actions/first-interaction - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} From d3b33a4029556d9cd3c7a06ae3610809407f16a3 Mon Sep 17 00:00:00 2001 From: Joe Allen <166914918+jallenjallen@users.noreply.github.com> Date: Sat, 23 Aug 2025 12:59:03 +0100 Subject: [PATCH 3/4] changed time to every 2 mins --- .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 1dff2ca9032acf1bd5611fa8d8fa59c5d82e7232 Mon Sep 17 00:00:00 2001 From: Joe Allen <166914918+jallenjallen@users.noreply.github.com> Date: Sat, 23 Aug 2025 13:08:51 +0100 Subject: [PATCH 4/4] multi event example --- .github/workflows/multi-event.yml | 21 +++++++++++++++++++++ 1 file changed, 21 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..aaf0ab6fe --- /dev/null +++ b/.github/workflows/multi-event.yml @@ -0,0 +1,21 @@ +name: Multi-Event Example + +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