Skip to content

Commit

Permalink
fix: check if user exists before adding him to kvm group
Browse files Browse the repository at this point in the history
  • Loading branch information
librarian committed Mar 8, 2024
1 parent 5be07b2 commit cc679d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/prepare/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ runs:
curl -4 -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${OS_ARCH}.tar.xz \
| tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${CCACHE_VERSION}-linux-${OS_ARCH}/ccache
ls -la /usr/local/bin/ccache
- name: add user github to kvm group
- name: add user github to kvm group if exists
shell: bash
run: |
id -u github 2>/dev/null && {
sudo usermod -a -G kvm github
id github
grep kvm /etc/group
} || echo "user github not found"

0 comments on commit cc679d2

Please sign in to comment.