From 74ce329acb80dbbfbfba493f22032c3d46d74042 Mon Sep 17 00:00:00 2001 From: Heming Zhen Date: Fri, 20 Nov 2020 10:27:10 -0500 Subject: [PATCH 1/3] change file --- .github/src/testfile.txt | 1 - src/testfile.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .github/src/testfile.txt create mode 100644 src/testfile.txt diff --git a/.github/src/testfile.txt b/.github/src/testfile.txt deleted file mode 100644 index 30d74d2..0000000 --- a/.github/src/testfile.txt +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/src/testfile.txt b/src/testfile.txt new file mode 100644 index 0000000..458aab0 --- /dev/null +++ b/src/testfile.txt @@ -0,0 +1 @@ +test abc \ No newline at end of file From 613fc8623d02ea5f7f5a6a6e627cd26340332338 Mon Sep 17 00:00:00 2001 From: Heming Zhen Date: Mon, 25 Oct 2021 12:24:22 -0400 Subject: [PATCH 2/3] test dependency --- .github/workflows/example_workflow.yml | 15 +++++++++------ README.md | 0 src/testfile.txt | 0 3 files changed, 9 insertions(+), 6 deletions(-) mode change 100644 => 100755 .github/workflows/example_workflow.yml mode change 100644 => 100755 README.md mode change 100644 => 100755 src/testfile.txt diff --git a/.github/workflows/example_workflow.yml b/.github/workflows/example_workflow.yml old mode 100644 new mode 100755 index 06665fc..d84889c --- a/.github/workflows/example_workflow.yml +++ b/.github/workflows/example_workflow.yml @@ -14,14 +14,17 @@ on: jobs: - success-job: + job_1: runs-on: ubuntu-latest + if: github.event_name == 'push' steps: - - name: print success - run: echo "Success!" + - name: print job run + run: echo "Job 1 run" - failure-job: + + job_2: runs-on: ubuntu-latest + needs: job_1 steps: - - name: print failure - run: echo "Fail!" && exit 1 + - name: print job run + run: echo "job 2 run." diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/src/testfile.txt b/src/testfile.txt old mode 100644 new mode 100755 From 9caf2825a80d2ad6c034daf788757f814c8c59d5 Mon Sep 17 00:00:00 2001 From: Heming Zhen Date: Mon, 25 Oct 2021 12:31:04 -0400 Subject: [PATCH 3/3] change settings. --- .github/workflows/example_workflow.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/example_workflow.yml b/.github/workflows/example_workflow.yml index d84889c..b2ecbb5 100755 --- a/.github/workflows/example_workflow.yml +++ b/.github/workflows/example_workflow.yml @@ -16,8 +16,11 @@ on: jobs: job_1: runs-on: ubuntu-latest - if: github.event_name == 'push' + steps: + - name: test for early exit + if: github.event_name != 'push' + run: echo "skip job 1" && exit 0 - name: print job run run: echo "Job 1 run"