diff --git a/.github/workflows/issue-comment.yaml b/.github/workflows/issue-comment.yaml new file mode 100644 index 000000000..dd122acec --- /dev/null +++ b/.github/workflows/issue-comment.yaml @@ -0,0 +1,18 @@ +name: issue-comment-workflow +on: issue-comment + + +jobs: + pr-comment: + if: ${{ github.event.issue.pull_request}} + runs-on: ubuntu-latest + steps: + - name: pr comment + run: echo ${{ github.event.issue.pull_request}} + + issue-comment: + if: ${{ !github.event.issue.pull_request}} + runs-on: ubuntu-latest + steps: + - name: issue comment + run: echo ${{ github.event.issue.pull_request}} \ No newline at end of file diff --git a/.github/workflows/part1/isuue.yaml b/.github/workflows/part1/isuue.yaml new file mode 100644 index 000000000..591d68518 --- /dev/null +++ b/.github/workflows/part1/isuue.yaml @@ -0,0 +1,15 @@ +name: issue-workflow1 +on: + issues: + types: [opened] + +jobs: + pull-request-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo Hi Haaland diff --git a/.github/workflows/part1/pull_request.yaml b/.github/workflows/part1/pull_request.yaml new file mode 100644 index 000000000..8f5042acc --- /dev/null +++ b/.github/workflows/part1/pull_request.yaml @@ -0,0 +1,13 @@ +name: pull-request-workflow +on: pull_request + +jobs: + pull-request-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo Hi Haaland \ No newline at end of file diff --git a/.github/workflows/part1/push.yaml b/.github/workflows/part1/push.yaml new file mode 100644 index 000000000..3c278fbbd --- /dev/null +++ b/.github/workflows/part1/push.yaml @@ -0,0 +1,13 @@ +name: push-workflow-2 +on: push + +jobs: + push-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo Hi Haaland