Skip to content

build(deps): bump docker/build-push-action from 2 to 5 #353

build(deps): bump docker/build-push-action from 2 to 5

build(deps): bump docker/build-push-action from 2 to 5 #353

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-linux:
name: Build / ubuntu-latest (x86_64) / ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
steps:
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y libudev-dev libgtk-4-dev jq
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
use_cross: true
command: test
args: --target ${{ matrix.target }}
- name: Build x86_64
uses: actions-rs/cargo@v1
with:
use_cross: true
command: build
args: --release --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: goldboot-${{ matrix.target }}
path: target/${{ matrix.target }}/release/goldboot
# - uses: actions/upload-artifact@v4
# with:
# name: goldboot-linux-${{ matrix.target }}
# path: target/release/goldboot-linux
# - name: Build goldboot-linux image x86_64
# run: |
# export RUST_BACKTRACE=1
# export RUST_LOG=debug
# target/release/goldboot init --template GoldbootLinux
# jq '.templates[0].executable = "target/release/goldboot-linux"' goldboot.json >goldboot.json.tmp
# mv goldboot.json.tmp goldboot.json
# target/release/goldboot build --output goldboot-linux-x86_64.gb
# - uses: actions/upload-artifact@v4
# with:
# name: goldboot-linux-x86_64.gb
# path: goldboot-linux-x86_64.gb
build-macos:
name: Build / macos-latest (x86_64)
runs-on: macos-latest
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Build x86_64
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@v4
with:
name: goldboot-x86_64-apple-darwin
path: target/release/goldboot
build-windows:
name: Build / windows-latest (x86_64)
runs-on: windows-latest
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Build x86_64
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@v4
with:
name: goldboot-x86_64-pc-windows-msvc
path: target/release/goldboot
build-docker:
if: github.event_name != 'pull_request'
name: Build docker / ubuntu-latest
runs-on: ubuntu-latest
needs: build-linux
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Copy goldboot-x86_64-unknown-linux-musl
uses: actions/download-artifact@v4
with:
name: goldboot-x86_64-unknown-linux-musl
path: goldboot/linux-amd64
- name: Copy goldboot-aarch64-unknown-linux-musl
uses: actions/download-artifact@v4
with:
name: goldboot-aarch64-unknown-linux-musl
path: goldboot/linux-arm64
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: goldboot
platforms: linux/amd64,linux/arm64 #,linux/arm/v7
push: true
tags: fossable/goldboot:latest
- name: Update Dockerhub readme
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: fossable/goldboot