ci(package): remove privilege

This commit is contained in:
Thomas Hobson 2021-03-14 13:49:30 +13:00
parent 911de04d98
commit 31b9e98b06
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 19 additions and 2 deletions

View File

@ -11,7 +11,7 @@ on:
- 'packages/**' - 'packages/**'
jobs: jobs:
check-build: build-pkg:
name: Check that package builds name: Check that package builds
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -29,6 +29,23 @@ jobs:
run: | run: |
docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' docker.pkg.github.com/engineer-man/piston/repo-builder $(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | awk -F/ '{ print $2 "-" $3 }' | sort -u) --no-server docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' docker.pkg.github.com/engineer-man/piston/repo-builder $(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | awk -F/ '{ print $2 "-" $3 }' | sort -u) --no-server
- name: Upload package as artifact
uses: actions/upload-artifact@v2
with:
name: packages
path: packages/*.pkg.tar.gz
test-pkg:
name: Test package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: packages
- name: Write test config file - name: Write test config file
uses: DamianReeves/write-file-action@v1.0 uses: DamianReeves/write-file-action@v1.0
with: with:
@ -52,7 +69,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' --name piston_fs_repo docker.pkg.github.com/engineer-man/piston/repo-builder $PACKAGES & docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' --name piston_fs_repo docker.pkg.github.com/engineer-man/piston/repo-builder $PACKAGES &
docker run -v $(pwd)'/data:/piston' -v $(pwd)'/repo:/repo' --privileged --name api docker.pkg.github.com/engineer-man/piston/api & docker run -v $(pwd)'/data:/piston' --name api docker.pkg.github.com/engineer-man/piston/api &
echo Waiting for API to start.. echo Waiting for API to start..
while [[ "$(curl -s -w '%{http_code}' http://api:6969/runtimes)" != "200" ]]; do sleep 5; done while [[ "$(curl -s -w '%{http_code}' http://api:6969/runtimes)" != "200" ]]; do sleep 5; done