Port unprivileged restore to aarch64 #24
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
name: Build | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- 'release-*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
BUNDLENAME: ${{ steps.compute.outputs.BUNDLENAME }} | |
steps: | |
- name: Compute parameters | |
id: compute | |
run: | | |
if [ ${{ startsWith(github.ref, 'refs/tags/') }} = true ]; then | |
TAG=${GITHUB_REF##refs/tags/} | |
BUNDLENAME=criu-crac-${TAG} | |
else | |
TAG=notag | |
BUNDLENAME=criu-crac-build-${{ github.run_number }} | |
fi | |
for i in TAG BUNDLENAME; do | |
echo "::set-output name=${i}::${!i}" | |
done | |
- name: Start build container | |
run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_ACTOR} --password-stdin docker.pkg.github.com; | |
docker run -d --name build | |
-w $PWD | |
-v /home/runner:/home/runner | |
-u $(id -u):$(id -g) | |
--entrypoint tail | |
docker.pkg.github.com/crac/docker-build/image:ubuntu-16.04 | |
-f /dev/null | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- name: Submodule init | |
run: | | |
git submodule init | |
git submodule update | |
- run: make DESTDIR=. PREFIX=/${{ steps.compute.outputs.BUNDLENAME }} install-criu V=1 | |
shell: docker exec build bash -e {0} | |
- run: tar -zcf ${{ steps.compute.outputs.BUNDLENAME }}.tar.gz ${{ steps.compute.outputs.BUNDLENAME }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.compute.outputs.BUNDLENAME }} | |
path: ${{ steps.compute.outputs.BUNDLENAME }}.tar.gz | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.build.outputs.BUNDLENAME }} | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ needs.build.outputs.BUNDLENAME }}.tar.gz | |