diff --git a/.github/issue_comment.yaml b/.github/issue_comment.yaml new file mode 100644 index 000000000..f3a64bead --- /dev/null +++ b/.github/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/issue.yaml b/.github/workflows/part1/issue.yaml new file mode 100644 index 000000000..ce41651b0 --- /dev/null +++ b/.github/workflows/part1/issue.yaml @@ -0,0 +1,16 @@ +name: issue-workflow +on: + issues: + types: [opened] + +jobs: + issue-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo github action + \ No newline at end of file diff --git a/.github/workflows/part1/pull_request.yaml b/.github/workflows/part1/pull_request.yaml new file mode 100644 index 000000000..5b4a1a3d0 --- /dev/null +++ b/.github/workflows/part1/pull_request.yaml @@ -0,0 +1,16 @@ +name: pull-request-workflow +on: + pull_request: + types: [opened] + +jobs: + pull-request-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo github action + echo pull_request \ 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..0ada5b5fd --- /dev/null +++ b/.github/workflows/part1/push.yaml @@ -0,0 +1,14 @@ +name: push-workflow +on: push + +jobs: + push-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo hello world + - name: step2 + run: | + echo hello world + echo github action + echo I am Ryan Lee \ No newline at end of file diff --git a/README.md b/README.md index ea85d664a..395c4ab0c 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# github-actions-setting \ No newline at end of file +# github-actions-changes diff --git a/test.txt b/test.txt new file mode 100644 index 000000000..60989a2d1 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +hello world! 2