Update dockerfile #14
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
# This is a basic workflow to help you get started with Actions | |
name: default | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Compile and extract artifacts from docker container | |
run: | | |
mkdir -p dist | |
for arch in x86_64 aarch64; do | |
docker build --platform "${arch}" -t alpine:bwrap . | |
docker run --rm --platform "${arch}" -v $(pwd):/workdir alpine:bwrap cp /bubblewrap/build/bwrap "/workdir/dist/bwrap-${arch}" | |
done | |
- name: Set permissions for dist directory | |
run: | | |
sudo chown -R "$(id -u)":"$(id -g)" dist/ | |
sudo chmod -R 766 dist/ | |
- name: Upload artifacts to release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bwrap | |
path: 'dist' | |
- name: Compute Short SHA | |
id: ssha | |
run: | | |
echo "ssha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
outputs: | |
ssha: ${{ steps.ssha.outputs.ssha }} | |
release: | |
permissions: write-all | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: bwrap | |
- name: release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
title: Continuous ${{ needs.build.outputs.ssha }} | |
automatic_release_tag: ${{ needs.build.outputs.ssha }} | |
prerelease: false | |
draft: false | |
files: | | |
*bwrap* | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |