.github/workflows/build.yml #11
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
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: # Allow manual triggering | |
jobs: | |
bake: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true # we want to re-download freshest layers anyway | |
swap-storage: true | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
config: ./buildkitd.toml | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Create bakefiles | |
run: | | |
export DHUBREPO=advian | |
./create_builds.py pyenv > pyenv.hcl | |
./create_builds.py tox-base > tox-base.hcl | |
- name: Bake pyenv | |
run: | | |
docker buildx bake --pull --provenance=true --sbom=true --push --file ./pyenv.hcl | |
- name: Bake tox | |
run: | | |
docker buildx bake --pull --provenance=true --sbom=true --push --file ./tox-base.hcl |