Skip to content

Commit

Permalink
CI deployment: update env vars
Browse files Browse the repository at this point in the history
Rename environment variables for deployment to:
$CI_BUILD_WEB_URL
$CI_JOB_WEB_URL

Fix bug with $CI_JOB_WEB_URL on GitHub Actions
  • Loading branch information
dhimmel committed Jan 30, 2020
1 parent 713000d commit 8924d7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/manubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
MANUBOT_SSH_PRIVATE_KEY: ${{ secrets.MANUBOT_SSH_PRIVATE_KEY }}
BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks
CI_BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks
CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/runs/${{ github.run_id }}
shell: bash --login {0}
run: |
if [ "$MANUBOT_SSH_PRIVATE_KEY" != "" ]; then
Expand Down
8 changes: 4 additions & 4 deletions ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ set -o errexit \
# set environment variables for either Travis or GitHub Actions
REPO_SLUG=${TRAVIS_REPO_SLUG:-$GITHUB_REPOSITORY}
COMMIT=${TRAVIS_COMMIT:-$GITHUB_SHA}
BUILD_WEB_URL=${TRAVIS_BUILD_WEB_URL:-$BUILD_WEB_URL}
JOB_WEB_URL=${TRAVIS_JOB_WEB_URL:-"https://github.com/$GITHUB_REPOSITORY/runs/$GITHUB_ACTION"}
CI_BUILD_WEB_URL=${CI_BUILD_WEB_URL:-$TRAVIS_BUILD_WEB_URL}
CI_JOB_WEB_URL=${CI_JOB_WEB_URL:-$TRAVIS_JOB_WEB_URL}
BRANCH=${TRAVIS_BRANCH:-master}

# Add commit hash to the README
Expand Down Expand Up @@ -68,8 +68,8 @@ This build is based on
https://github.com/$REPO_SLUG/commit/$COMMIT.
This commit was created by the following CI build and job:
$BUILD_WEB_URL
$JOB_WEB_URL
$CI_BUILD_WEB_URL
$CI_JOB_WEB_URL
"

# Deploy the manubot outputs to output
Expand Down

0 comments on commit 8924d7d

Please sign in to comment.