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 e9f0c70
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 39 deletions.
54 changes: 15 additions & 39 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 @@ -41,32 +36,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# 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: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -80,19 +58,17 @@ jobs:
type=schedule,pattern={{date 'YYYY-MM-DD'}}
type=sha
- name: Test Bake
run: |
docker buildx bake \
-f docker-bake.hcl \
-f ${{ steps.meta.outputs.bake-file-labels }} \
--print \
${{ inputs.target }}
- name: Test Bakefile
run: docker buildx bake --print -f docker-bake.hcl -f ${{ steps.meta.outputs.bake-file-labels }}
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 e9f0c70

Please sign in to comment.