Skip to content

Commit

Permalink
Merge branch 'docs-token' into devel
Browse files Browse the repository at this point in the history
- closes #492
  • Loading branch information
casperdcl committed May 5, 2021
2 parents 89d16b3 + 3dbf98b commit 44b797e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/checkbot.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
name: checkbot

on:
issue_comment:
types: [created]

env:
repo_token: ${{ secrets.TEST_GITHUB_TOKEN }}

jobs:
# check that CML container builds properly
build-container:
if: contains(github.event.comment.body, '/tests')
runs-on: [ubuntu-18.04]

steps:
- uses: actions/checkout@v2

- name: Build test image and publish
run: |
- name: Build test image and publish
run: |
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker build -t dvcorg/cml -f ./docker/Dockerfile .
Expand All @@ -26,7 +20,7 @@ jobs:
docker tag dvcorg/cml dvcorg/cml-test
docker push dvcorg/cml-test
docker run --name runner --rm \
-e "repo_token=$repo_token" \
-e "REPO_TOKEN=${{ secrets.TEST_GITHUB_TOKEN }}" \
-e "RUNNER_REPO=https://github.com/${GITHUB_REPOSITORY}" \
-e "RUNNER_LABELS=cml-docker" \
-e "RUNNER_IDLE_TIMEOUT=10" \
Expand All @@ -44,7 +38,7 @@ jobs:
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.3

- uses: r-lib/actions/setup-r@master

- uses: actions/setup-python@v2
Expand All @@ -54,11 +48,12 @@ jobs:
- name: "CML test"
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
REPO_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}
run: |
echo 'Check container!' > report.md
vl2svg assets/vega-lite.json | cml-publish --md >> report.md
Expand Down Expand Up @@ -142,7 +137,7 @@ jobs:
}).then( (pr) => {
console.log(`::set-output name=COMMAND::${process.env.COMMAND}`)
})
- name: chatactions
run: |
npm ci
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
python train.py
- name: Write CML report
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Post reports as comments in GitHub PRs
cat results.txt >> report.md
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
- uses: iterative/setup-cml@v1
- name: Train model
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install -r requirements.txt
python train.py
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
- uses: actions/checkout@v2
- name: Train model
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
Expand Down Expand Up @@ -391,7 +391,7 @@ jobs:
- uses: actions/checkout@v2
- name: Deploy runner on EC2
env:
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
Expand All @@ -408,7 +408,7 @@ jobs:
- uses: actions/checkout@v2
- name: Train model
env:
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
pip install -r requirements.txt
python train.py
Expand Down
2 changes: 1 addition & 1 deletion bin/cml-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const opts = decamelize(
.default('token')
.describe(
'token',
'Personal access token to be used. If not specified in extracted from ENV repo_token.'
'Personal access token to be used. If not specified in extracted from ENV REPO_TOKEN.'
)
.default('driver')
.choices('driver', ['github', 'gitlab'])
Expand Down

2 comments on commit 44b797e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

Please sign in to comment.