diff --git a/.github/workflows/A.yml b/.github/workflows/A.yml deleted file mode 100644 index 5cec005..0000000 --- a/.github/workflows/A.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Workflow A -on: push - -jobs: - sleep: - runs-on: ubuntu-latest - steps: - - name: Before - run: echo "..." - - name: Sleep - run: sleep 60 - - name: After - run: echo "done" diff --git a/.github/workflows/B.yml b/.github/workflows/B.yml deleted file mode 100644 index 1feda77..0000000 --- a/.github/workflows/B.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Workflow B -on: push - -jobs: - sleep: - runs-on: ubuntu-latest - steps: - - name: Before - run: echo "..." - - name: Sleep - run: sleep 60 - - name: After - run: echo "done" diff --git a/.github/workflows/cancel-dups.yml b/.github/workflows/cancel-dups.yml deleted file mode 100644 index 555ccb6..0000000 --- a/.github/workflows/cancel-dups.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Cancelling -on: - workflow_run: - workflows: - - Workflow A - - Workflow B - types: [ 'requested' ] - -jobs: - cancel-dups: - name: Cancel duplicate workflow runs - runs-on: ubuntu-latest - if: github.event.workflow_run.name != 'Workflow B' - - steps: - - uses: potiuk/cancel-workflow-runs@master - name: "Cancel duplicate workflow runs" - with: - token: ${{ secrets.GITHUB_TOKEN }} - cancelMode: duplicates - sourceRunId: ${{ github.event.workflow_run.id }} - - cancel-builds: - name: Cancel duplicate builds - runs-on: ubuntu-latest - - # Keep the branch part of this condition in sync with the corresponding condition in build.yml - if: > - github.event.workflow_run.name == 'Workflow B' && ! ( - github.event.workflow_run.head_branch == '🙄' - ) - - steps: - - uses: potiuk/cancel-workflow-runs@master - name: "Cancel duplicate builds" - with: - token: ${{ secrets.GITHUB_TOKEN }} - cancelMode: duplicates - sourceRunId: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/dump.yml b/.github/workflows/dump.yml new file mode 100644 index 0000000..e009966 --- /dev/null +++ b/.github/workflows/dump.yml @@ -0,0 +1,19 @@ +name: Dump +on: pull_request + +jobs: + dump: + name: Dump foo.txt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + git fetch origin "$GITHUB_BASE_REF" + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git merge FETCH_HEAD + - run: cat foo.txt + - run: git branch -a + - run: git log diff --git a/foo.txt b/foo.txt index 00750ed..7ed6ff8 100644 --- a/foo.txt +++ b/foo.txt @@ -1 +1 @@ -3 +5