Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
ci: add trigger user permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywang committed Jan 28, 2024
1 parent 9a09107 commit a1b4d51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ jobs:
if: github.repository == 'virt-s1/bootc-workflow-test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get User Permission
id: user_permission
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: checkout code
if: steps.user_permission.require-result == 'true'
uses: actions/checkout@v3

- name: Build container
if: steps.user_permission.require-result == 'true'
run: |
sudo apt-get install -y podman
podman build -t bootc-test-runner:x86_64 -f tools/Dockerfile tools
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ RUN dnf -y update && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf aws awscliv2.zip && \
rm -rf aws awscliv2.zip

0 comments on commit a1b4d51

Please sign in to comment.