1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- name: Release Docker image
- on:
- push:
- branches: [main, dev]
- workflow_dispatch:
- env:
- CARGO_TERM_COLOR: always
- jobs:
- docker:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- id: checkout
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- id: rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- target: aarch64-unknown-linux-gnu
- override: true
- - name: Setup Rust Cache
- id: rust-cache
- uses: Swatinem/rust-cache@v2
- - name: Build
- id: rust_build
- uses: actions-rs/cargo@v1
- with:
- use-cross: true
- command: build
- args: --release --target aarch64-unknown-linux-gnu
- - name: Setup QEMU
- id: qemu
- uses: docker/setup-qemu-action@v3
- - name: Setup Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v3
- - name: Login to DockerHub
- id: login
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Build Image and Push
- id: docker_build
- uses: docker/build-push-action@v5
- with:
- context: .
- file: ./Dockerfile
- platforms: linux/arm64/v8
- cache-to: type=gha,mode=max,ignore-error=true
- cache-from: type=gha
- push: true
- tags: 'revanced/revanced-discord-bot:latest-arm64'
|