Skip to content

Commit

Permalink
ci(binutils): push binutils image
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jul 13, 2023
1 parent 3345924 commit 908178b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/binutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ concurrency:

on:
workflow_dispatch:
inputs:
repo:
description: 'Registry repo'
required: true
default: 'tonistiigi/xx'
type: string
release:
description: 'Push image and create GitHub Release'
required: false
type: boolean
push:
branches:
- 'master'
Expand Down Expand Up @@ -55,11 +65,45 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: ${{ inputs.release }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
push: ${{ inputs.release || false }}
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
env:
XX_REPO: ${{ inputs.repo }}

release:
runs-on: ubuntu-latest
if: ${{ inputs.release }}
needs:
- binutils
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Prepare
run: |
version=$(docker buildx bake _binutils-version --print | jq -cr '.target."_binutils-version".args."BINUTILS_VERSION"')
echo "VERSION=${version}" >> $GITHUB_ENV
-
# TODO: Create release notes with list of image tags pushed
name: GitHub Release
uses: crazy-max/ghaction-github-release@v1
with:
name: binutils/${{ env.VERSION }}-${{ github.run_number }}
tag_name: binutils/${{ env.VERSION }}-${{ github.run_number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 908178b

Please sign in to comment.