Skip to content

Commit

Permalink
ci: push proposal 'use' images
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jan 18, 2024
1 parent 08c0e48 commit 8b1e336
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,26 @@ jobs:
# Enable corepack for packageManager config
- run: corepack enable || sudo corepack enable
- run: yarn install
# Set up docker-bake files used by docker/bake-action
- run: node_modules/.bin/synthetic-chain prepare-ci

- name: build proposal images
run: |
docker info
node_modules/.bin/synthetic-chain build
# TODO run tests in another (non-matrixed) job once "use" images are available in another worker
# Matrix within "bake" instead of GitHub Actions because the actions
# won't resolv the DAG of what to build first.
- name: Push proposal "use" images
uses: docker/bake-action@v4
with:
files: |
./docker-bake.json
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: use
# FIXME DONOTMERGE change to skip PRs once the PR is approved
push: true
# Only build on "main" merges because the tags aren't qualified by PR.
# If we pushed from PRs, each one would overwrite (e.g. use-upgrade-8)
# push: ${{ github.event_name != 'pull_request' }}

# TODO run tests in another (non-matrixed) job once "use" images are available in another worker
- name: run proposal tests
if: ${{ matrix.platform == env.X86_PLATFORM }}
run: node_modules/.bin/synthetic-chain test
Expand Down
7 changes: 7 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// If you're new to Bake:
// https://blog.kubesimplify.com/bake-your-container-images-with-bake

// for https://github.com/docker/metadata-action?tab=readme-ov-file#bake-definition
target "docker-metadata-action" {}

// PROPOSALS variable is filled by docker-bake.json, which this config merges upon
// https://docs.docker.com/build/bake/reference/#file-format

Expand All @@ -9,6 +15,7 @@ group "default" {
}

target "use" {
inherits = ["docker-metadata-action"]
name = "use-${proposal}"
matrix = {
proposal = PROPOSALS
Expand Down

0 comments on commit 8b1e336

Please sign in to comment.