Skip to content

Commit

Permalink
Install gh at start of workflows for CentOS 7 & OracleLinux 8 (#1883)
Browse files Browse the repository at this point in the history
If the install fails, the process will end directly. This should avoid
the following frustrating scenario in case of failure

```
[OK] Install g++10
[OK] Configure
[OK] Build
[KO] Install gh
[ ] Upload assets <= Not done, assets missing
```
  • Loading branch information
flomnes authored Jan 19, 2024
1 parent 968cdf9 commit 34b868c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
yum install -y centos-release-scl
yum install -y devtoolset-10-gcc*
- name: Install gh if needed
if: ${{ env.IS_RELEASE == 'true' }}
run: |
yum -y install dnf
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh
- name: Configure
run: |
source /opt/rh/devtoolset-10/enable
Expand Down Expand Up @@ -115,14 +123,6 @@ jobs:
with:
path: _build/*.rpm

- name: Install gh
if: ${{ env.IS_RELEASE == 'true' }}
run: |
yum -y install dnf
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ jobs:
run: |
pip3 install -r src/tests/examples/requirements.txt
- name: Install gh if needed
if: ${{ env.IS_RELEASE == 'true' }}
run: |
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh
- name: Configure
run: |
source /opt/rh/gcc-toolset-10/enable
Expand Down Expand Up @@ -104,13 +111,6 @@ jobs:
with:
path: _build/*.rpm

- name: Install gh
if: ${{ env.IS_RELEASE == 'true' }}
run: |
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
Expand Down

0 comments on commit 34b868c

Please sign in to comment.