Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yzewei committed Feb 18, 2024
2 parents c9fb14a + 4930672 commit c4b6a79
Show file tree
Hide file tree
Showing 14 changed files with 237 additions and 103 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
open-pull-requests-limit: 10
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- "bot"
10 changes: 5 additions & 5 deletions .github/workflows/bats-assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Test
working-directory: ./util/bats-assert
run: docker buildx bake test
-
name: Login to DockerHub
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Publish
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
workdir: ./util/bats-assert
targets: all
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: validate

Expand Down Expand Up @@ -140,25 +140,25 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Test
if: ${{ matrix.typ != 'rhel' }}
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: test
set: |
test-${{ matrix.typ }}.args.TEST_BASE_IMAGE=${{ matrix.image }}
-
name: Test (info)
if: ${{ matrix.typ == 'rhel' }}
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: test-info
set: |
Expand All @@ -172,17 +172,17 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
tonistiigi/xx
Expand All @@ -194,13 +194,13 @@ jobs:
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
Expand Down
107 changes: 61 additions & 46 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ concurrency:
cancel-in-progress: true

on:
schedule:
- cron: '0 8 */6 * *' # every 6 days
workflow_dispatch:
inputs:
release:
Expand All @@ -26,10 +28,6 @@ on:
- 'src/ld/**'
- 'docker-bake.hcl'

env:
# needs latest for output platform-split support
BUILDKIT_IMAGE: "moby/buildkit:latest"

jobs:
binutils-targets:
runs-on: ubuntu-latest
Expand All @@ -38,7 +36,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Create targets matrix
id: targets
Expand All @@ -61,16 +59,16 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: ${{ matrix.target }}
set: |
Expand All @@ -82,34 +80,44 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: ld64-static-tgz
set: |
ld64-static-tgz.cache-from=type=gha,scope=ld64-static-tgz
ld64-static-tgz.cache-to=type=gha,scope=ld64-static-tgz
ld64-static-tgz.output=type=local,dest=./dist,platform-split=false
ld64-static-tgz.output=type=local,dest=./dist
-
name: List artifacts
name: Rename provenance
run: |
for pdir in ./dist/*/; do
(
cd "$pdir"
binname=$(find . -name '*.tar.gz')
filename=$(basename "${binname%.tar.gz}")
mv "provenance.json" "${filename}.provenance.json"
)
done
-
name: Move and list artifacts
run: |
mv ./dist/**/* ./dist/
tree -nh ./dist
-
name: Upload artifacts
if: ${{ inputs.release }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ld
name: ld-ld64
path: ./dist/*
if-no-files-found: error
retention-days: 1
Expand All @@ -121,7 +129,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Create targets matrix
id: targets
Expand All @@ -144,34 +152,44 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: ${{ matrix.target }}
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
*.output=type=local,dest=./dist,platform-split=false
*.output=type=local,dest=./dist
-
name: List artifacts
name: Rename provenance
run: |
for pdir in ./dist/*/; do
(
cd "$pdir"
binname=$(find . -name '*.tar.gz')
filename=$(basename "${binname%.tar.gz}")
mv "provenance.json" "${filename}.provenance.json"
)
done
-
name: Move and list artifacts
run: |
mv ./dist/**/* ./dist/
tree -nh ./dist
-
name: Upload artifacts
if: ${{ inputs.release }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ld
name: ld-${{ matrix.target }}
path: ./dist/*
if-no-files-found: error
retention-days: 1
Expand All @@ -181,18 +199,16 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: lipo
set: |
Expand All @@ -204,18 +220,16 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
targets: sigtool
set: |
Expand All @@ -231,18 +245,19 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Prepare
run: |
version=$(docker buildx bake ld-linux-amd64-static-tgz --print | jq -cr '.target."ld-linux-amd64-static-tgz".args."BINUTILS_VERSION"')
echo "VERSION=${version}" >> $GITHUB_ENV
-
name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ld
path: ./dist
pattern: ld-*
merge-multiple: true
-
name: GitHub Release
uses: softprops/action-gh-release@v1
Expand All @@ -262,7 +277,7 @@ jobs:
GITHUB_RELEASE_TAG: prebuilt/ld-${{ env.VERSION }}-${{ github.run_number }}
-
name: Create PR
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with:
base: master
branch: bot/generate-ld-shas
Expand Down
Loading

0 comments on commit c4b6a79

Please sign in to comment.