Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/cancel-workflow-runs
Submodule cancel-workflow-runs added at 953e05
1 change: 1 addition & 0 deletions .github/actions/github-push-action
Submodule github-push-action added at 057a6b
7 changes: 5 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,17 @@ 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
- name: Tag commit
run: |
BRANCH_NAME=${GITHUB_REF##*/}
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to checkout the submodules on the checkout action just above this. Look at the Airflow ci.yml workflow.

(Sorry, on phone else I'd be more precise)

with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
- uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to checkout before cancelling?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per this post, we need to get the code for the action (thus checking out with submodules) so that it can be run.

uses: actions/checkout@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In build_wheels.yml we use checkout@master, why use checkout@v2 here?

Copy link
Member

@potiuk potiuk Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. checkout@v2 is better - GitHub might introduce breaking changes in v3, so it's wise to change it in build_wheels.yml as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah thanks. Done!

with:
persist-credentials: false
submodules: recursive
- uses: ./.github/actions/cancel-workflow-runs
name: "Cancel duplicate workflow runs"
with:
cancelMode: duplicates
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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