Add infra to build and release on github #2
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: ci | |
on: push | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
load: true | |
push: false | |
tags: bird2/build:latest | |
- | |
name: build | |
run: | | |
docker cp $(docker create --name tc bird2/build:latest):/bird/pkg/pkgs/debian-11/bird2_2.15-cznic.1/bird2_2.15-cznic.1_amd64.deb ./bird2_2.15_amd64-debian11.deb && docker rm tc | |
tar -czf bird2_2.15_amd64-debian11.deb.tar.gz bird2_2.15_amd64-debian11.deb | |
sha256sum bird2_2.15_amd64-debian11.deb.tar.gz | awk '{ print $1 }' > bird2_2.15_amd64-debian11.deb.tar.gz.sha256 | |
- | |
name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
bird2_2.15_amd64-debian11.deb.tar.gz | |
bird2_2.15_amd64-debian11.deb.tar.gz.sha256 |