Skip to content

Commit

Permalink
test: print matrix bake in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
adamblake committed Jan 9, 2025
1 parent 284680b commit 7788a93
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ on:
type: boolean
required: false
default: false
update-conda:
description: Whether to update Conda packages
type: boolean
required: false
default: false

jobs:
docker:
Expand All @@ -48,28 +43,11 @@ jobs:
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Login to Docker Registry
# uses: docker/login-action@v3
# with:
# username: ${{ vars.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_TOKEN }}

# - name: Setup Pixi
# if: inputs.target != 'base' && inputs.update-conda
# uses: prefix-dev/[email protected]
# with:
# run-install: false

# - name: Update Conda packages
# if: inputs.target != 'base' && inputs.update-conda
# shell: bash
# run: pixi update

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

- name: Image Metadata
id: meta
Expand All @@ -80,19 +58,23 @@ jobs:
type=schedule,pattern={{date 'YYYY-MM-DD'}}
type=sha
- name: Test Bake
- name: Test Bakefile
run: |
docker buildx bake \
-f docker-bake.hcl \
-f ${{ steps.meta.outputs.bake-file-labels }} \
--set *.labels.org.opencontainers.image.ref.name=${{ inputs.target }}:${{ steps.meta.outputs.tags[0] }} \
--print \
${{ inputs.target }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAGS: ${{ steps.meta.outputs.tags }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push
# uses: docker/bake-action@v5
# with:
# files: docker-bake.hcl,${{ steps.meta.outputs.bake-file }}
# files: docker-bake.hcl,${{ steps.meta.outputs.bake-file-labels }}
# targets: ${{ inputs.target }}
# push: true
# env:
# TAGS: ${{ steps.meta.outputs.tags }}
20 changes: 20 additions & 0 deletions .github/workflows/publish2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,23 @@ jobs:
secrets: inherit
with:
target: base

images:
needs: base
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- base-r
- essentials
- r
- datascience
- ckcode
- deepnote-datascience-r
steps:
- name: Bake Image
uses: ./.github/workflows/bake.yml
with:
target: ${{ matrix.target }}
free-disk-space: true

0 comments on commit 7788a93

Please sign in to comment.