From 224b6c27970e2a9959bfcfba48efec47a5447014 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Wed, 4 May 2022 10:50:59 -0700 Subject: [PATCH 1/2] Call new GitHub Actions workflow to rebuild images See nextstrain/docker-base#41 --- .github/workflows/ci.yaml | 2 +- package.json | 1 - scripts/rebuild-docker-image.sh | 17 ----------------- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100755 scripts/rebuild-docker-image.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cbc6f3ad3..bfffc1189 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -81,7 +81,7 @@ jobs: registry-url: https://registry.npmjs.org/ - run: node --version - run: npm ci - - run: npm run rebuild-docker-image + - run: gh workflow run ci.yml --repo nextstrain/docker-base - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 302932988..3ef55e73d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "lint:fix": "eslint --fix src", "get-data": "env bash ./scripts/get-data.sh", "heroku-postbuild": "npm run build && npm run get-data", - "rebuild-docker-image": "env bash ./scripts/rebuild-docker-image.sh", "gzip-and-upload": "env bash ./scripts/gzip-and-upload.sh", "build-docs": "cd docs && make clean && make html && echo 'Docs rebuild, open docs/_build/html/index.html'", "test": "jest test/*.js", diff --git a/scripts/rebuild-docker-image.sh b/scripts/rebuild-docker-image.sh deleted file mode 100755 index 314c2a500..000000000 --- a/scripts/rebuild-docker-image.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -echo "Pinging Travis CI to rebuild Docker image" - -body='{ - "request": { - "branch": "master", - "message": "Build triggered from auspice" - } -}' - -curl -X POST https://api.travis-ci.com/repo/nextstrain%2Fdocker-base/requests \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -H "Travis-API-Version: 3" \ - -H "Authorization: token $TRAVIS_AUTH_TOKEN" \ - -d "$body" From 90d1fe04a1fee4752d2442a87e625541bc36511f Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Wed, 4 May 2022 10:52:18 -0700 Subject: [PATCH 2/2] Move docker rebuild to a separate job This is more consistent with the process for Augur: https://github.com/nextstrain/augur/blob/master/.github/workflows/ci.yaml --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bfffc1189..0b31cc7a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -81,7 +81,11 @@ jobs: registry-url: https://registry.npmjs.org/ - run: node --version - run: npm ci - - run: gh workflow run ci.yml --repo nextstrain/docker-base - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + rebuild-docker-image: + needs: [publish] + runs-on: ubuntu-latest + steps: + - run: gh workflow run ci.yml --repo nextstrain/docker-base