diff --git a/github-actions/templates/greetings.yml b/.github/greetings.yml similarity index 100% rename from github-actions/templates/greetings.yml rename to .github/greetings.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 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" diff --git a/github-actions/templates/manual.yml b/.github/workflows/manual.yml similarity index 100% rename from github-actions/templates/manual.yml rename to .github/workflows/manual.yml diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml new file mode 100644 index 000000000..b200d991f --- /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"