From 4c4d19b873cd73e7b9b31996333b2192cad42de4 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Tue, 12 Jan 2021 11:06:08 -0800 Subject: [PATCH 1/3] [BEAM-11569] Enabling wheels to be built using Beam-based submodules workflow --- .github/actions/cancel-workflow-runs | 1 + .github/actions/github-push-action | 1 + .github/workflows/build_wheels.yml | 2 +- .github/workflows/cancel.yml | 2 +- .gitmodules | 6 ++++++ 5 files changed, 10 insertions(+), 2 deletions(-) create mode 160000 .github/actions/cancel-workflow-runs create mode 160000 .github/actions/github-push-action diff --git a/.github/actions/cancel-workflow-runs b/.github/actions/cancel-workflow-runs new file mode 160000 index 000000000000..953e057dc81d --- /dev/null +++ b/.github/actions/cancel-workflow-runs @@ -0,0 +1 @@ +Subproject commit 953e057dc81d3458935a18d1184c386b0f6b5738 diff --git a/.github/actions/github-push-action b/.github/actions/github-push-action new file mode 160000 index 000000000000..057a6ba835d9 --- /dev/null +++ b/.github/actions/github-push-action @@ -0,0 +1 @@ +Subproject commit 057a6ba835d986bfe495dd476a6c4db1d5f9503c diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b81c5e60165d..6ef55e5cc719 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -256,7 +256,7 @@ jobs: echo "Tagging ${BRANCH_NAME}" git tag -f nightly-${BRANCH_NAME} HEAD - name: Push tags - uses: apache/airflow-github-push-action@b007e7b818e33b04afd056e4c4b57ba917145d7a + uses: ./.github/actions/github-push-action with: github_token: ${{ secrets.GITHUB_TOKEN }} tags: true diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml index a20d36e29bec..541e28bc3aeb 100644 --- a/.github/workflows/cancel.yml +++ b/.github/workflows/cancel.yml @@ -30,7 +30,7 @@ jobs: name: "Cancel duplicate workflow runs" runs-on: ubuntu-latest steps: - - uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738 + - uses: ./.github/actions/cancel-workflow-runs name: "Cancel duplicate workflow runs" with: cancelMode: duplicates diff --git a/.gitmodules b/.gitmodules index 5abfbe7da83e..3a6406c405f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "website/www/site/themes/docsy"] path = website/www/site/themes/docsy url = https://github.com/google/docsy.git +[submodule ".github/actions/cancel-workflow-runs"] + path = .github/actions/cancel-workflow-runs + url = https://github.com/potiuk/cancel-workflow-runs +[submodule ".github/actions/github-push-action"] + path = .github/actions/github-push-action + url = https://github.com/ad-m/github-push-action From 84399a7ee22ecce347b3a2a8e0f7037146c01c40 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Tue, 12 Jan 2021 12:16:03 -0800 Subject: [PATCH 2/3] Ensuring Beam is checked out to run actions in current repo --- .github/workflows/build_wheels.yml | 3 +++ .github/workflows/cancel.yml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 6ef55e5cc719..813814930c6c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -250,6 +250,9 @@ jobs: steps: - name: Checkout code on master branch uses: actions/checkout@master + with: + persist-credentials: false + submodules: recursive - name: Tag commit run: | BRANCH_NAME=${GITHUB_REF##*/} diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml index 541e28bc3aeb..ea46ebf89d36 100644 --- a/.github/workflows/cancel.yml +++ b/.github/workflows/cancel.yml @@ -30,6 +30,11 @@ jobs: name: "Cancel duplicate workflow runs" runs-on: ubuntu-latest steps: + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v2 + with: + persist-credentials: false + submodules: recursive - uses: ./.github/actions/cancel-workflow-runs name: "Cancel duplicate workflow runs" with: From 8b9ae08748ac2d9a0c31986c105a7fea32528dff Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Wed, 13 Jan 2021 16:13:31 -0800 Subject: [PATCH 3/3] Pinning checkout to v2 --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 813814930c6c..8dff63936866 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -249,7 +249,7 @@ jobs: if: github.repository_owner == 'apache' && github.event_name == 'schedule' steps: - name: Checkout code on master branch - uses: actions/checkout@master + uses: actions/checkout@v2 with: persist-credentials: false submodules: recursive