mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
100 lines
2.8 KiB
YAML
100 lines
2.8 KiB
YAML
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.8
|
|
- 5.9
|
|
steps:
|
|
- name: check out repository code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Grab git slugs (short commit id, branch etc.)
|
|
uses: rlespinasse/github-slug-action@v3.x
|
|
|
|
- name: set up qemu
|
|
uses: docker/setup-qemu-action@v4
|
|
|
|
- name: setup docker buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
with:
|
|
install: true
|
|
use: true
|
|
|
|
- name: login to github container registry
|
|
uses: docker/login-action@v4
|
|
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@v7
|
|
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@v7
|
|
|
|
- name: get vcs details
|
|
uses: rlespinasse/github-slug-action@v3.x
|
|
|
|
- name: setup docker qemu
|
|
uses: docker/setup-qemu-action@v4
|
|
|
|
- name: setup docker buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
with:
|
|
install: true
|
|
use: true
|
|
|
|
- name: github container registry authentication
|
|
uses: docker/login-action@v4
|
|
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@v7
|
|
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
|