Skip to content

Commit

Permalink
Avoid use of ##[add-path] in GitHub Actions
Browse files Browse the repository at this point in the history
This is already done in the develop branch. Whitespace changes are to
match the version of this file in develop too.

This causes the following failure due to a GitHub Actions change:

https://github.com/juju/juju/pull/12324/checks?check_run_id=1408765804:

Error: Unable to process command '+ echo '##[add-path]/snap/bin'' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '##[add-path]/snap/bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
  • Loading branch information
benhoyt committed Nov 16, 2020
1 parent d56aa4d commit 8c17064
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: "Snapcraft"
on: [push, pull_request]
jobs:

snap:
name: linux-amd64
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:

- name: Install Dependencies
shell: bash
run: |
Expand All @@ -16,19 +18,23 @@ jobs:
sudo lxd waitready
sudo lxd init --auto
sudo chmod a+wr /var/snap/lxd/common/lxd/unix.socket
echo "##[add-path]/snap/bin"
echo "/snap/bin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v2

- name: Build snap
shell: bash
run: |
set -euxo pipefail
snapcraft --use-lxd
- name: Install snap
shell: bash
run: |
set -euxo pipefail
sudo snap install *.snap --dangerous --classic
- name: Test bootstrap
shell: bash
run: |
Expand Down

0 comments on commit 8c17064

Please sign in to comment.