Skip to content

Commit

Permalink
if !fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
ms609 committed Feb 19, 2024
1 parent 1e28df8 commit b0f94e5
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,14 @@ jobs:
image: ${{ matrix.config.container }}

steps:
- name: Install sudo (Linux)
if: runner.os == 'Linux'
- name: Check distribution
run: echo "::set-output name=distribution::$(awk -F= '/^ID=/{print $2}' /etc/os-release)"
id: check_distribution
- name: Run step only on Fedora
if: ${{ steps.check_distribution.outputs.distribution != 'fedora' }}
run: |
. /etc/os-release
echo $ID
if [ "$ID" = "fedora" ]; then
yum install sudo
fi
if command -v apt-get &> /dev/null
then
apt-get install sudo
fi
echo steps.check_distribution.outputs.distribution
apt-get install sudo
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-hub/rhub2/actions/rhub-checkout@v1
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
Expand Down

0 comments on commit b0f94e5

Please sign in to comment.