From 1c294c81db618462934b9ce5b5f676794c0e18f7 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Wed, 23 Jun 2021 22:44:20 +0200 Subject: [PATCH 1/3] github action: enforce bash default configuration --- .github/workflows/pull-request.yml | 30 ++++++++++++++++++++++ .github/workflows/release-to-publish.yml | 3 +++ .github/workflows/tag-to-draft-release.yml | 6 ++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7a8f7beb34..1160b5c8a3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -15,6 +15,9 @@ jobs: build-linux: name: Build ${{ matrix.chunk }} runs-on: ubuntu-latest + defaults: + run: + shell: bash strategy: matrix: chunk: [0, 1, 2, 3, 4, 5, 6, 7] @@ -47,6 +50,9 @@ jobs: build-debug-ipv6: name: Debug IPv6 ${{ matrix.chunk }} runs-on: ubuntu-latest + defaults: + run: + shell: bash strategy: matrix: chunk: [0, 1, 2, 3, 4, 5, 6, 7] @@ -78,6 +84,9 @@ jobs: build-windows: name: Windows runs-on: windows-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -110,6 +119,9 @@ jobs: build-mac: name: Mac runs-on: macOS-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -139,6 +151,9 @@ jobs: build-pio: name: Build Platform.IO runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -163,6 +178,9 @@ jobs: host-tests: name: Host tests runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -184,6 +202,9 @@ jobs: documentation: name: Documentation runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -208,6 +229,9 @@ jobs: style-check: name: Style and formatting runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -248,6 +272,9 @@ jobs: boards-check: name: Boards.txt check runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -275,6 +302,9 @@ jobs: code-spell: name: Check spelling runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/release-to-publish.yml b/.github/workflows/release-to-publish.yml index 852f3b69a5..a3718c00f5 100644 --- a/.github/workflows/release-to-publish.yml +++ b/.github/workflows/release-to-publish.yml @@ -32,6 +32,9 @@ jobs: package: name: Update master JSON file runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/tag-to-draft-release.yml b/.github/workflows/tag-to-draft-release.yml index 7830743318..909b49ded1 100644 --- a/.github/workflows/tag-to-draft-release.yml +++ b/.github/workflows/tag-to-draft-release.yml @@ -14,6 +14,9 @@ jobs: package: name: Package runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: @@ -25,7 +28,8 @@ jobs: - name: Set GIT tag name run: | # Sets an environment variable used in the next steps - echo "TRAVIS_TAG=$(git describe --exact-match --tags)" >> $GITHUB_ENV + TRAVIS_TAG=$(git describe --exact-match --tags)" + echo "TRAVIS_TAG=${TRAVIS_TAG}" >> $GITHUB_ENV - name: Build package JSON env: TRAVIS_BUILD_DIR: ${{ github.workspace }} From a083c11da091c7074fe9df658d38f68025c17000 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Wed, 23 Jun 2021 23:03:44 +0200 Subject: [PATCH 2/3] (not for windows) --- .github/workflows/pull-request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1160b5c8a3..74f1b43063 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -84,9 +84,6 @@ jobs: build-windows: name: Windows runs-on: windows-latest - defaults: - run: - shell: bash steps: - uses: actions/checkout@v2 with: @@ -253,6 +250,9 @@ jobs: mock-check: name: Mock trivial test runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 with: From f060ac6ba4a4b8fc36d958311773c6048b891cc5 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Wed, 23 Jun 2021 23:12:06 +0200 Subject: [PATCH 3/3] fix quoting and split another command --- .github/workflows/release-to-publish.yml | 3 ++- .github/workflows/tag-to-draft-release.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-to-publish.yml b/.github/workflows/release-to-publish.yml index a3718c00f5..90b71d72fd 100644 --- a/.github/workflows/release-to-publish.yml +++ b/.github/workflows/release-to-publish.yml @@ -45,7 +45,8 @@ jobs: python-version: '3.x' - name: Set GIT tag name run: | - echo "TRAVIS_TAG=$(git describe --exact-match --tags)" >> $GITHUB_ENV + TRAVIS_TAG="$(git describe --exact-match --tags)" + echo "TRAVIS_TAG=\"${TRAVIS_TAG}\"" >> $GITHUB_ENV - name: Deploy updated JSON env: TRAVIS_BUILD_DIR: ${{ github.workspace }} diff --git a/.github/workflows/tag-to-draft-release.yml b/.github/workflows/tag-to-draft-release.yml index 909b49ded1..e649723982 100644 --- a/.github/workflows/tag-to-draft-release.yml +++ b/.github/workflows/tag-to-draft-release.yml @@ -28,8 +28,8 @@ jobs: - name: Set GIT tag name run: | # Sets an environment variable used in the next steps - TRAVIS_TAG=$(git describe --exact-match --tags)" - echo "TRAVIS_TAG=${TRAVIS_TAG}" >> $GITHUB_ENV + TRAVIS_TAG="$(git describe --exact-match --tags)" + echo "TRAVIS_TAG=\"${TRAVIS_TAG}\"" >> $GITHUB_ENV - name: Build package JSON env: TRAVIS_BUILD_DIR: ${{ github.workspace }}