From 796262a4ed992d53c4ee55b273a0037febeebafc Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 9 Aug 2019 15:51:26 -0400 Subject: [PATCH 01/10] [ci] Convert GitHub Actions files to new format GitHub.com is changing the supported configuration file format for its "Actions" feature [1]. Update to the new format. This change set was produced using the tooling provided by GitHub.com [2]. [1] > The documentation at https://developer.github.com/actions and > support for the HCL syntax in GitHub Actions will be deprecated on > September 30, 2019. Documentation for the new limited public beta > using the YAML syntax is available on https://help.github.com. See > "Automating your workflow with GitHub Actions" for documentation > using the YAML syntax. https://developer.github.com/actions/ [2] https://github.com/actions/migrate --- .github/main.workflow | 32 ------------------- .github/workflows/pull_request.yml | 14 ++++++++ ...sh-build-publish-documentation-website.yml | 14 ++++++++ .../workflows/push-build-release-manifest.yml | 14 ++++++++ 4 files changed, 42 insertions(+), 32 deletions(-) delete mode 100644 .github/main.workflow create mode 100644 .github/workflows/pull_request.yml create mode 100644 .github/workflows/push-build-publish-documentation-website.yml create mode 100644 .github/workflows/push-build-release-manifest.yml diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index 20a0f33256..0000000000 --- a/.github/main.workflow +++ /dev/null @@ -1,32 +0,0 @@ -workflow "Build & Release Manifest" { - on = "push" - resolves = ["manifest-build-and-tag"] -} - -action "manifest-build-and-tag" { - uses = "./tools/docker/github" - runs = ["python", "tools/ci/manifest_build.py"] - secrets = ["GITHUB_TOKEN"] -} - -workflow "Build & Publish Documentation Website" { - on = "push" - resolves = ["website-build-and-publish"] -} - -action "website-build-and-publish" { - uses = "./tools/docker/documentation" - runs = ["/bin/bash", "tools/ci/website_build.sh"] - secrets = ["DEPLOY_TOKEN"] -} - -workflow "Synchronize the Pull Request Preview" { - on = "pull_request" - resolves = "update-pr-preview" -} - -action "update-pr-preview" { - uses = "./tools/docker/github" - runs = ["python", "tools/ci/update_pr_preview.py", "https://api.github.com"] - secrets = ["GITHUB_TOKEN"] -} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000000..0bedfe3d42 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,14 @@ +on: pull_request +name: Synchronize the Pull Request Preview +jobs: + update-pr-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: update-pr-preview + uses: ./tools/docker/github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: python + args: tools/ci/update_pr_preview.py https://api.github.com diff --git a/.github/workflows/push-build-publish-documentation-website.yml b/.github/workflows/push-build-publish-documentation-website.yml new file mode 100644 index 0000000000..de226d173f --- /dev/null +++ b/.github/workflows/push-build-publish-documentation-website.yml @@ -0,0 +1,14 @@ +on: push +name: Build & Publish Documentation Website +jobs: + website-build-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: website-build-and-publish + uses: ./tools/docker/documentation + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + with: + entrypoint: /bin/bash + args: tools/ci/website_build.sh diff --git a/.github/workflows/push-build-release-manifest.yml b/.github/workflows/push-build-release-manifest.yml new file mode 100644 index 0000000000..6c97a2f7b9 --- /dev/null +++ b/.github/workflows/push-build-release-manifest.yml @@ -0,0 +1,14 @@ +on: push +name: Build & Release Manifest +jobs: + manifest-build-and-tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: manifest-build-and-tag + uses: ./tools/docker/github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: python + args: tools/ci/manifest_build.py From ec021fbb4bf606e7efa7fc5b0d57337e36b9a9ae Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 9 Aug 2019 18:35:36 -0400 Subject: [PATCH 02/10] Remove some GitHub workflows --- .../push-build-publish-documentation-website.yml | 14 -------------- .github/workflows/push-build-release-manifest.yml | 14 -------------- 2 files changed, 28 deletions(-) delete mode 100644 .github/workflows/push-build-publish-documentation-website.yml delete mode 100644 .github/workflows/push-build-release-manifest.yml diff --git a/.github/workflows/push-build-publish-documentation-website.yml b/.github/workflows/push-build-publish-documentation-website.yml deleted file mode 100644 index de226d173f..0000000000 --- a/.github/workflows/push-build-publish-documentation-website.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: push -name: Build & Publish Documentation Website -jobs: - website-build-and-publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: website-build-and-publish - uses: ./tools/docker/documentation - env: - DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} - with: - entrypoint: /bin/bash - args: tools/ci/website_build.sh diff --git a/.github/workflows/push-build-release-manifest.yml b/.github/workflows/push-build-release-manifest.yml deleted file mode 100644 index 6c97a2f7b9..0000000000 --- a/.github/workflows/push-build-release-manifest.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: push -name: Build & Release Manifest -jobs: - manifest-build-and-tag: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: manifest-build-and-tag - uses: ./tools/docker/github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - entrypoint: python - args: tools/ci/manifest_build.py From 40392e2e520c42ebdc300c19e8b776115718751c Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 9 Aug 2019 18:58:02 -0400 Subject: [PATCH 03/10] React to `delete` events --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0bedfe3d42..575d0cf363 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,4 +1,4 @@ -on: pull_request +on: [pull_request, delete] name: Synchronize the Pull Request Preview jobs: update-pr-preview: From 94accc17783ddc35e88896d1d2dffa44eff26862 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 9 Aug 2019 20:04:53 -0400 Subject: [PATCH 04/10] Try explicit syntax --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 575d0cf363..66e2c570c2 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,7 +4,7 @@ jobs: update-pr-preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: ${{ format('actions/checkout@refs/pull/{0}/merge', github.event.number) }} - name: update-pr-preview uses: ./tools/docker/github env: From f73b1aec21fa1e000f35062cd6d507313b046547 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 12 Aug 2019 13:35:16 -0400 Subject: [PATCH 05/10] Revert "Try explicit syntax" This reverts commit 94accc17783ddc35e88896d1d2dffa44eff26862. --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 66e2c570c2..575d0cf363 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,7 +4,7 @@ jobs: update-pr-preview: runs-on: ubuntu-latest steps: - - uses: ${{ format('actions/checkout@refs/pull/{0}/merge', github.event.number) }} + - uses: actions/checkout@master - name: update-pr-preview uses: ./tools/docker/github env: From d1eaa1cc91572978778356ab54346038bc933868 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 12 Aug 2019 13:36:52 -0400 Subject: [PATCH 06/10] Use explicit version --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 575d0cf363..34ad25b329 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,7 +4,7 @@ jobs: update-pr-preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v1.0.0 - name: update-pr-preview uses: ./tools/docker/github env: From 7c397b88e6889dc3a68bb5730bfcbafae5162b8d Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 12 Aug 2019 13:37:02 -0400 Subject: [PATCH 07/10] Specify reference to check out --- .github/workflows/pull_request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 34ad25b329..0a4e2ee4ff 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,10 +1,12 @@ -on: [pull_request, delete] +on: pull_request name: Synchronize the Pull Request Preview jobs: update-pr-preview: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1.0.0 + with: + ref: refs/heads/master - name: update-pr-preview uses: ./tools/docker/github env: From abc677aa4d7961edba03976726dadf97b470a0ed Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Wed, 14 Aug 2019 15:32:37 -0400 Subject: [PATCH 08/10] Run action without check out and output more info --- .github/workflows/pull_request.yml | 3 --- tools/ci/update_pr_preview.py | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0a4e2ee4ff..47b9e012c7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,9 +4,6 @@ jobs: update-pr-preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1.0.0 - with: - ref: refs/heads/master - name: update-pr-preview uses: ./tools/docker/github env: diff --git a/tools/ci/update_pr_preview.py b/tools/ci/update_pr_preview.py index 9b104c66bb..c5d2e95655 100644 --- a/tools/ci/update_pr_preview.py +++ b/tools/ci/update_pr_preview.py @@ -250,6 +250,9 @@ def main(api_root): if __name__ == '__main__': + import subprocess + logger.info(subprocess.check_output(['git', 'status'])) + logger.info(subprocess.check_output(['git', 'log', '-n1'])) code = main(sys.argv[1]) assert isinstance(code, int) sys.exit(code) From 2e59d30a7e589b94c3db29eb55737895dc914f3a Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Wed, 14 Aug 2019 15:33:29 -0400 Subject: [PATCH 09/10] Empty commit From 09f47283be04fcf59fb930d0d52426b5e33b6729 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Wed, 14 Aug 2019 15:38:00 -0400 Subject: [PATCH 10/10] Reinstate checkout action --- .github/workflows/pull_request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 47b9e012c7..0a4e2ee4ff 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,6 +4,9 @@ jobs: update-pr-preview: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v1.0.0 + with: + ref: refs/heads/master - name: update-pr-preview uses: ./tools/docker/github env: