Skip to content

Commit

Permalink
ci: workflow to build and push binutils
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed May 10, 2022
1 parent d7d25e2 commit b2295f7
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/binutils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: binutils

on:
push:
branches:
- 'master'
tags:
- 'binutils/*'
pull_request:

jobs:
targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.targets.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create matrix
id: targets
run: |
echo ::set-output name=matrix::$(docker buildx bake binutils --print | jq -cr '.group.default.targets')
-
name: Show matrix
run: |
echo ${{ steps.targets.outputs.matrix }}
build:
runs-on: ubuntu-latest
needs:
- targets
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.targets.outputs.matrix) }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
push: ${{ startsWith(github.ref, 'refs/tags/') }}

0 comments on commit b2295f7

Please sign in to comment.