-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
name: Build, Test, and Publish an Image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target: | ||
description: The target to bake | ||
type: string | ||
required: false | ||
runs-on: | ||
description: The runner to use | ||
type: string | ||
required: false | ||
default: ubuntu-latest | ||
free-disk-space: | ||
description: Whether to free disk space before building | ||
type: boolean | ||
required: false | ||
default: false | ||
update-conda: | ||
description: Whether to update Conda packages | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
docker: | ||
runs-on: ${{ inputs.runs-on }} | ||
|
||
steps: | ||
# - name: Free Disk Space (Ubuntu) | ||
# if: inputs.free-disk-space | ||
# uses: jlumbroso/free-disk-space@main | ||
# with: | ||
# dotnet: ${{ inputs.free-disk-space }} | ||
# haskell: ${{ inputs.free-disk-space }} | ||
# large-packages: ${{ inputs.free-disk-space }} | ||
# swap-storage: ${{ inputs.free-disk-space }} | ||
|
||
# - 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: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
|
||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Image Metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# images: | | ||
# ${{ github.repository_owner }}/${{ inputs.target }} | ||
# ghcr.io/${{ github.repository_owner }}/${{ inputs.target }} | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=schedule,pattern={{date 'YYYY-MM-DD'}} | ||
type=sha | ||
# - name: Build and push | ||
# uses: docker/bake-action@v5 | ||
# with: | ||
# files: docker-bake.hcl,${{ steps.meta.outputs.bake-file }} | ||
# targets: ${{ inputs.target }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Bake Images | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [feature/*] | ||
paths: | ||
- .github/workflows/publish2.yml | ||
- docker-bake.hcl | ||
- pixi.lock | ||
- pixi.toml | ||
- packages.yaml | ||
- dockerfiles/** | ||
- scripts/** | ||
- assets/** | ||
schedule: | ||
# Weekly, at 03:00 on Monday UTC time (see https://crontab.guru) | ||
- cron: "0 3 * * 1" | ||
|
||
# https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
foundation: | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
target: foundation | ||
|
||
base: | ||
needs: [foundation] | ||
uses: ./.github/workflows/bake.yml | ||
secrets: inherit | ||
with: | ||
target: base |