You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/09/06 10:25:02 UTC
[logging-parent] 02/02: Explicitly specify `shell` in workflows to get `set -eo pipefail`
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
commit e3a2a9589ac39f2c42c42c9a3b6a29f3c1ff8f39
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Wed Sep 6 12:24:15 2023 +0200
Explicitly specify `shell` in workflows to get `set -eo pipefail`
Fail-fast behavior using `set -eo pipefail` is optional in
workflows and enabled when `shell: bash` is explicitly specified[1].
[1] https://stackoverflow.com/q/75419587/1278899
---
.github/workflows/deploy-release-reusable.yml | 6 ++++++
.github/workflows/deploy-snapshot-reusable.yml | 2 ++
2 files changed, 8 insertions(+)
diff --git a/.github/workflows/deploy-release-reusable.yml b/.github/workflows/deploy-release-reusable.yml
index 1052717..9402d66 100644
--- a/.github/workflows/deploy-release-reusable.yml
+++ b/.github/workflows/deploy-release-reusable.yml
@@ -77,6 +77,7 @@ jobs:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
- name: Export version
+ shell: bash
run: |
[[ "$GIT_REF" =~ ^refs/heads/release/.+$ ]] || {
echo "was expecting a \`refs/heads/release/\`-prefixed Git reference, found: \`$GIT_REF\`"
@@ -88,6 +89,7 @@ jobs:
GIT_REF: ${{ github.ref }}
- name: Set the Maven `revision` property
+ shell: bash
run: |
export REVISION=$(./mvnw \
--non-recursive --quiet --batch-mode \
@@ -110,6 +112,7 @@ jobs:
fi
- name: Release changelog
+ shell: bash
run: |
./mvnw \
--non-recursive --batch-mode --errors --no-transfer-progress \
@@ -123,6 +126,7 @@ jobs:
fi
- name: Upload to Nexus
+ shell: bash
run: |
gpg --list-secret-keys
./mvnw \
@@ -136,6 +140,7 @@ jobs:
SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }}
- name: Create the distribution
+ shell: bash
run: |
# Generate the distribution (i.e., `src.zip` and optional `bin.zip`)
@@ -170,6 +175,7 @@ jobs:
EOF
- name: Upload to Subversion
+ shell: bash
run: |
# Checkout the SVN repository
diff --git a/.github/workflows/deploy-snapshot-reusable.yml b/.github/workflows/deploy-snapshot-reusable.yml
index b3557d3..71e5203 100644
--- a/.github/workflows/deploy-snapshot-reusable.yml
+++ b/.github/workflows/deploy-snapshot-reusable.yml
@@ -53,6 +53,7 @@ jobs:
server-password: NEXUS_PASSWORD
- name: Export version
+ shell: bash
run: |
export PROJECT_VERSION=$(./mvnw \
--quiet --batch-mode -DforceStdout=true \
@@ -62,6 +63,7 @@ jobs:
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
- name: Upload to Nexus
+ shell: bash
run: |
gpg --list-secret-keys
./mvnw \