repub cache only if new nodes joined the network #39
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: cross | |
on: | |
push: | |
branches: [ "master", "sqlx", "sync-new-nodes"] | |
tags: | |
- 'v*.*.*' | |
jobs: | |
cross-compile: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Install Cross | |
run: | | |
curl -L "https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz" | | |
tar xz -C $HOME/.cargo/bin | |
- name: Launch cross-compile.sh script | |
run: | | |
./cross-compile.sh | |
- name: Login to GitHub container registry (ghcr.io) | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push x86 | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/sifis-alpine-dht-amd64-${{ github.head_ref || github.ref_name }}:${{github.run_number}} | |
context: target/x86_64-unknown-linux-musl/release | |
file: docker/Dockerfile-amd64 | |
- name: Build and push arm64v8 | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/sifis-alpine-dht-arm64v8-${{ github.head_ref || github.ref_name }}:${{github.run_number}} | |
context: target/aarch64-unknown-linux-musl/release | |
file: docker/Dockerfile-OpenWrt |