openssl? #41
Workflow file for this run
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
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
name: compile | |
jobs: | |
build: | |
name: Linux Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set output | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-unknown-linux-musl | |
override: true | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target aarch64-unknown-linux-musl | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target x86_64-unknown-linux-musl | |
- uses: docker/setup-buildx-action@v1 | |
id: buildx | |
with: | |
install: true | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
run: | | |
cp target/x86_64-unknown-linux-musl/release/easypwned easypwned | |
cp target/x86_64-unknown-linux-musl/release/easypwned_haveibeenpwned_downloader easypwned_haveibeenpwned_downloader | |
docker buildx build --platform linux/amd64 -t easybill/easypwned:latest_amd64 --push . | |
cp target/aarch64-unknown-linux-musl/release/easypwned easypwned | |
cp target/aarch64-unknown-linux-musl/release/easypwned_haveibeenpwned_downloader easypwned_haveibeenpwned_downloader | |
docker buildx build --platform linux/arm64 -t easybill/easypwned:latest_arm64 --push . | |
docker manifest create easybill/easypwned:latest easybill/easypwned:latest_amd64 easybill/easypwned:latest_arm64 | |
docker manifest push easybill/easypwned:latest | |
- name: Build and push release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
docker manifest create easybill/easypwned:${{ steps.vars.outputs.tag }} easybill/easypwned:latest_amd64 easybill/easypwned:latest_arm64 | |
docker manifest push easybill/easypwned:${{ steps.vars.outputs.tag }} | |
- name: Release Build | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cp target/aarch64-unknown-linux-musl/release/easypwned easypwned_${{ steps.vars.outputs.tag }}_linux_aarch64 | |
cp target/aarch64-unknown-linux-musl/release/easypwned_haveibeenpwned_downloader easypwned_haveibeenpwned_downloader_${{ steps.vars.outputs.tag }}_linux_aarch64 | |
cp target/x86_64-unknown-linux-musl/release/easypwned easypwned_${{ steps.vars.outputs.tag }}_linux_x86_64 | |
cp target/x86_64-unknown-linux-musl/release/easypwned_haveibeenpwned_downloader easypwned_haveibeenpwned_downloader_${{ steps.vars.outputs.tag }}_linux_x86_64 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
easypwned_${{ steps.vars.outputs.tag }}_linux_aarch64 | |
easypwned_haveibeenpwned_downloader_${{ steps.vars.outputs.tag }}_linux_aarch64 | |
easypwned_${{ steps.vars.outputs.tag }}_linux_x86_64 | |
easypwned_haveibeenpwned_downloader_${{ steps.vars.outputs.tag }}_linux_x86_64 |