Skip to content

Commit c431bc9

Browse files
author
Frank Sachsenheim
committed
GH workflows: Always runs shell commands in bash
That should let a workflow fail when a command does so.
1 parent 1463124 commit c431bc9

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ jobs:
4848
with:
4949
name: Package Metadata
5050
- id: echo-version
51+
shell: bash
5152
run: 'grep "^Version: " PKG-INFO | cut -d " " -f 2 >> $GITHUB_OUTPUT'
5253
- if: ${{ github.event_name == 'push' }}
54+
shell: bash
5355
run: >
5456
[ ${{ steps.echo-version.outputs.version }} == ${{ github.ref }} ]
5557
|| [ refs/tags/${{ steps.echo-version.outputs.version }} == ${{ github.ref }} ]
@@ -79,12 +81,14 @@ jobs:
7981
with:
8082
ref: ${{ inputs.ref || github.ref }}
8183

82-
- run: >
84+
- shell: bash
85+
run: >
8386
echo "PRERELEASE=${{ (
8487
contains('a', env.VERSION) || contains('b', env.VERSION)
8588
|| contains('rc', env.VERSION) || contains('pre', env.VERSION)
8689
) }}" >> $GITHUB_ENV
8790
- name: echo version related variables
91+
shell: bash
8892
run: |
8993
echo 'VERSION: ${{ env.VERSION }}'
9094
echo 'PRERELEASE: ${{ env.PRERELEASE }}'
@@ -103,9 +107,11 @@ jobs:
103107
type=pep440,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ env.PRERELEASE == 'false' }}
104108
- name: prepare push tag value
105109
id: push-tags-value
110+
shell: bash
106111
run: echo "tags=${{ steps.docker-metadata.outputs.tags }}" | tr "\n" " " | sed "s/${{ env.IMAGE_NAME }}://g" >> $GITHUB_OUTPUT
107112

108113
- name: install dependency for multi-platform builds
114+
shell: bash
109115
run: |
110116
sudo apt update
111117
sudo apt install -y qemu-user-static
@@ -121,13 +127,16 @@ jobs:
121127
tags: ${{ steps.docker-metadata.outputs.tags }}
122128

123129
- name: echo build outputs
130+
shell: bash
124131
run: |
125132
echo "Image: ${{ steps.build-image.outputs.image }}"
126133
echo "Tags: ${{ steps.build-image.outputs.tags }}"
127134
echo "Tagged Image: ${{ steps.build-image.outputs.image-with-tag }}"
128135
- name: echo created images
136+
shell: bash
129137
run: buildah images | grep '${{ env.IMAGE_NAME }}'
130138
- name: echo image metadata
139+
shell: bash
131140
run: buildah inspect ${{ steps.build-image.outputs.image-with-tag }}
132141

133142
- name: push to ghcr.io

.github/workflows/maintenance-update.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ jobs:
88
update:
99
runs-on: ubuntu-latest
1010
steps:
11-
- run: pipx install poetry
11+
- shell: bash
12+
run: pipx install poetry
1213
- uses: actions/checkout@v4
1314
- uses: actions/setup-python@v5
1415
with:
1516
python-version: "3.13"
1617
cache: poetry
17-
- run: poetry update --lock
18+
- shell: bash
19+
run: poetry update --lock
1820
- id: commit-and-push
1921
uses: stefanzweifel/git-auto-commit-action@v5
2022
with:
@@ -34,11 +36,13 @@ jobs:
3436
needs: [run-tests]
3537
runs-on: ubuntu-latest
3638
steps:
37-
- run: pipx install poetry
39+
- shell: bash
40+
run: pipx install poetry
3841
- uses: actions/checkout@v4
3942
with:
4043
ref: main
4144
- id: bump
45+
shell: bash
4246
run: |
4347
pipx run poetry version patch
4448
echo "version=$(poetry version --short)" >> $GITHUB_OUTPUT

.github/workflows/quality-checks.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ jobs:
3232
with:
3333
ref: ${{ inputs.ref || github.sha }}
3434
- uses: extractions/setup-just@v2
35-
- run: pipx install poetry
35+
- shell: bash
36+
run: pipx install poetry
3637
- uses: actions/setup-python@v5
3738
with:
3839
python-version: "3.13"
3940
cache: poetry
40-
- run: poetry install -v
41-
- run: just ${{ matrix.target }}
41+
- shell: bash
42+
run: poetry install -v
43+
- shell: bash
44+
run: just ${{ matrix.target }}
4245

4346
image-build-test:
4447
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)