-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fc45d9
commit ed5ca38
Showing
2 changed files
with
83 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
steps: | ||
- name: step1 | ||
run: | | ||
echo "step1" | ||
whatareyoudoing! | ||
step2: | ||
needs: prepare | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,88 @@ | ||
--- | ||
name: Greenboot ci | ||
# --- | ||
# name: Greenboot ci | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
# on: | ||
# issue_comment: | ||
# types: | ||
# - created | ||
|
||
jobs: | ||
pr-info: | ||
if: ${{ github.event.issue.pull_request && | ||
(startsWith(github.event.comment.body, '/test') || | ||
startsWith(github.event.comment.body, '/test-all')) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Query author repository permissions | ||
uses: octokit/[email protected] | ||
id: user_permission | ||
with: | ||
route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# jobs: | ||
# pr-info: | ||
# if: ${{ github.event.issue.pull_request && | ||
# (startsWith(github.event.comment.body, '/test') || | ||
# startsWith(github.event.comment.body, '/test-all')) }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Query author repository permissions | ||
# uses: octokit/[email protected] | ||
# id: user_permission | ||
# with: | ||
# route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# restrict running of tests to users with admin or write permission for the repository | ||
# see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user | ||
- name: Check if user does have correct permissions | ||
if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) | ||
id: check_user_perm | ||
run: | | ||
echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'" | ||
echo "allowed_user=true" >> $GITHUB_OUTPUT | ||
# # restrict running of tests to users with admin or write permission for the repository | ||
# # see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user | ||
# - name: Check if user does have correct permissions | ||
# if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) | ||
# id: check_user_perm | ||
# run: | | ||
# echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'" | ||
# echo "allowed_user=true" >> $GITHUB_OUTPUT | ||
|
||
- name: Get information for pull request | ||
uses: octokit/[email protected] | ||
id: pr-api | ||
with: | ||
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Get information for pull request | ||
# uses: octokit/[email protected] | ||
# id: pr-api | ||
# with: | ||
# route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
outputs: | ||
allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }} | ||
sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }} | ||
# outputs: | ||
# allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }} | ||
# sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }} | ||
|
||
greenboot-ci-test: | ||
needs: pr-info | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
- name: Check info | ||
run: | | ||
sudo pwd | ||
sudo ls | ||
- name: Checkout images code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: say-paul/images | ||
ref: remove-old-greenboot-services | ||
path: images | ||
- name: Check info | ||
run: | | ||
sudo pwd | ||
sudo ls | ||
- name: Checkout osbuild-composer code | ||
run: git clone https://github.com/osbuild/osbuild-composer.git | ||
- name: Check info | ||
run: | | ||
sudo pwd | ||
sudo ls | ||
- name: Run test | ||
run: ./test.sh | ||
- name: Checkout greenboot ci test code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: yih-redhat/greenboot-ci | ||
- name: Check info | ||
run: | | ||
sudo pwd | ||
sudo ls | ||
- name: Run greenboot-rs.sh test | ||
run: ./greenboot-rs.sh | ||
working-directory: ./greenboot-ci/tests | ||
timeout-minutes: 100 | ||
- name: Check info | ||
run: | | ||
sudo pwd | ||
sudo ls | ||
# greenboot-ci-test: | ||
# needs: pr-info | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Clone repository | ||
# uses: actions/checkout@v3 | ||
# - name: Check info | ||
# run: | | ||
# sudo pwd | ||
# sudo ls | ||
# - name: Checkout images code | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: say-paul/images | ||
# ref: remove-old-greenboot-services | ||
# path: images | ||
# - name: Check info | ||
# run: | | ||
# sudo pwd | ||
# sudo ls | ||
# - name: Checkout osbuild-composer code | ||
# run: git clone https://github.com/osbuild/osbuild-composer.git | ||
# - name: Check info | ||
# run: | | ||
# sudo pwd | ||
# sudo ls | ||
# - name: Run test | ||
# run: ./test.sh | ||
# - name: Checkout greenboot ci test code | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: yih-redhat/greenboot-ci | ||
# - name: Check info | ||
# run: | | ||
# sudo pwd | ||
# sudo ls | ||
# - name: Run greenboot-rs.sh test | ||
# run: ./greenboot-rs.sh | ||
# working-directory: ./greenboot-ci/tests | ||
# timeout-minutes: 100 | ||
# - name: Check info | ||
# run: | | ||
# sudo pwd | ||
# sudo ls |