8000 chore(build): workaround set-env deprecation (#7010) · Opentrons/opentrons@3db0fea · GitHub
[go: up one dir, main page]

Skip to content

Commit 3db0fea

Browse files
authored
chore(build): workaround set-env deprecation (#7010)
Github recently disabled the ::set-env command in their protocol runners because it was insecure (https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/). The fix for this was to use environment file piping instead. Unfortunately, even if you're interacting with it through e.g. a node wrapper like in https://github.com/actions/core, this is what you're always doing, so core needed a bump to v1.2.6 in all its dependencies. This didn't happen in https://github.com/actions/github-script as of this writing (open pr: actions/github-script#91) and therefore our builds started breaking. The workaround is to enable the old behavior and have a message that yells at you about it.
1 parent c382681 commit 3db0fea

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

.github/workflows/api-test-lint-deploy.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ defaults:
3131
run:
3232
shell: bash
3333

34+
env:
35+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
36+
3437
jobs:
3538
lint:
3639
name: 'opentrons package linting'
@@ -57,6 +60,9 @@ jobs:
5760
os: ['windows-latest', 'ubuntu-latest', 'macos-latest']
5861
runs-on: '${{ matrix.os }}'
5962
steps:
63+
- name: 'set insecure variable to work around actions/github-script not being updated'
64+
run: |
65+
echo "::warning Remove the environment entry ACTIONS_ALLOW_UNSECURE_COMMANDS as soon as possible once https://github.com/actions/github-script/pull/91 gets merged, actions/github-script gets a release, and we rely on it later in this workflow"
6066
- uses: 'actions/checkout@v2'
6167
- uses: 'actions/setup-node@v1'
6268
with:

.github/workflows/app-test-build-deploy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ env:
4242
CI: true
4343
OT_APP_DEPLOY_BUCKET: opentrons-app
4444
OT_APP_DEPLOY_FOLDER: builds
45+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
4546

4647
jobs:
4748
js-unit-test:
@@ -50,6 +51,9 @@ jobs:
5051
runs-on: 'ubuntu-latest'
5152
name: 'opentrons app frontend unit tests'
5253
steps:
54+
- name: 'set insecure variable to work around actions/github-script not being updated'
55+
run: |
56+
echo "::warning Remove the environment entry ACTIONS_ALLOW_UNSECURE_COMMANDS as soon as possible once https://github.com/actions/github-script/pull/91 gets merged, actions/github-script gets a release, and we rely on it later in this workflow"
5357
- uses: 'actions/checkout@v2'
5458
- uses: 'actions/setup-node@v1'
5559
with:

.github/workflows/docs-build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- '*'
2121
workflow_dispatch:
2222

23+
24+
env:
25+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
26+
2327
defaults:
2428
run:
2529
shell: bash
@@ -29,6 +33,9 @@ jobs:
2933
name: opentrons documentation build
3034
runs-on: 'ubuntu-latest'
3135
steps:
36+
- name: 'set insecure variable to work around actions/github-script not being updated'
37+
run: |
38+
echo "::warning Remove the environment entry ACTIONS_ALLOW_UNSECURE_COMANDS as soon as possible once https://github.com/actions/github-script/pull/91 gets merged, actions/github-script gets a release, and we rely on it later in this workflow"
3239
- uses: 'actions/checkout@v2'
3340
- uses: 'actions/setup-node@v1'
3441
with:

8000 ‎.github/workflows/js-check.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
name: 'js checks'
3434
runs-on: 'ubuntu-latest'
3535
steps:
36+
- name: 'set insecure variable to work around actions/github-script not being updated'
37+
run: |
38+
echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV
39+
echo "::warning Remove this as soon as possible once https://github.com/actions/github-script/pull/91 gets merged, actions/github-script gets a release, and we rely on it later in this workflow"
3640
- uses: 'actions/checkout@v2'
3741
- uses: 'actions/setup-node@v1'
3842
with:

.github/workflows/shared-data-test-lint-deploy.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
- 'shared-data/*/**'
2222
workflow_dispatch:
2323

24+
env:
25+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
26+
2427
defaults:
2528
run:
2629
shell: bash
@@ -51,6 +54,9 @@ jobs:
5154
os: ['windows-latest', 'ubuntu-latest', 'macos-latest']
5255
runs-on: '${{ matrix.os }}'
5356
steps:
57+
- name: 'set insecure variable to work around actions/github-script not being updated'
58+
run: |
59+
echo "::warning Remove the environment entry ACTIONS_ALLOW_UNSECURE_COMMANDS as soon as possible once https://github.com/actions/github-script/pull/91 gets merged, actions/github-script gets a release, and we rely on it later in this workflow"
5460
- uses: 'actions/checkout@v2'
5561
- uses: 'actions/setup-node@v1'
5662
with:

0 commit comments

Comments
 (0)
0