build(deps): bump dawidd6/action-homebrew-bump-formula from 3 to 4 (#… #400
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
name: Container images | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
workflow_dispatch: | |
jobs: | |
build-containers-with-zsh: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
zsh_version: | |
- 5.2.4 | |
- 5.3.1 | |
- 5.4.2 | |
- 5.5.1 | |
- 5.6.2 | |
- 5.7.1 | |
- 5.8 | |
- 5.9 | |
steps: | |
- name: check out repository code | |
uses: actions/checkout@v4 | |
- name: Grab git slugs (short commit id, branch etc.) | |
uses: rlespinasse/[email protected] | |
- name: set up qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup docker buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
use: true | |
- name: login to github container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push | |
id: docker_build_zsh_versions | |
uses: docker/build-push-action@v6 | |
timeout-minutes: 90 # compiling older zsh versions take a long time | |
with: | |
push: ${{ github.event.number == 0 }} | |
file: ./docker/Dockerfile | |
build-args: | | |
ZINIT_ZSH_VERSION=${{ matrix.zsh_version }}-tcsetpgrp | |
tags: | | |
ghcr.io/${{ github.repository }}:zsh-${{ matrix.zsh_version }} | |
ghcr.io/${{ github.repository }}:zsh-${{ matrix.zsh_version }}-${{ env.GITHUB_SHA_SHORT }} | |
platforms: linux/amd64,linux/arm64/v8 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-container-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: get vcs details | |
uses: rlespinasse/[email protected] | |
- name: setup docker qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup docker buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
use: true | |
- name: github container registry authentication | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build & push new image | |
id: docker_build_latest | |
uses: docker/build-push-action@v6 | |
if: github.ref == 'refs/heads/main' | |
with: | |
push: true | |
file: ./docker/Dockerfile | |
tags: | | |
ghcr.io/${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }} | |
ghcr.io/${{ github.repository }}:${{ env.GITHUB_REF_SLUG }} | |
platforms: linux/amd64,linux/arm64/v8 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |