Skip to content

Update push.yaml

Update push.yaml #133

Workflow file for this run

name: build
on:
push:
jobs:
lint:
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- run: shellcheck *.sh
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: Dockerfile
verbose: true
push:
needs: [lint]
uses: libops/.github/.github/workflows/build-push.yaml@main
permissions:
contents: read
packages: write
secrets: inherit
push-cli:
needs: [lint]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
strategy:
matrix:
cli: [claude, codex, gemini, opencode]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
platforms: linux/amd64,linux/arm64
build-args: CLI=${{ matrix.cli }}
tags: ghcr.io/libops/cli-sandbox:${{ matrix.cli }}
push: true
cache-from: type=registry,ref=ghcr.io/libops/cli-sandbox:cache-${{ matrix.cli }}
cache-to: type=registry,ref=ghcr.io/libops/cli-sandbox:cache-${{ matrix.cli }},mode=max