Skip to content

Commit

Permalink
publish cli image
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jan 8, 2025
1 parent 65af045 commit 71cb202
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'v*.*.*'

jobs:
publish-docker:
publish-bundle:
name: Build and push bundle image
runs-on: ubuntu-20.04
permissions:
Expand Down Expand Up @@ -57,3 +57,52 @@ jobs:
cache-to: type=gha,mode=max
build-args: |
GIT_COMMIT=${{ github.sha }}
publish-cli:
name: Build and push CLI image
runs-on: ubuntu-20.04
permissions:
contents: 'read'
id-token: 'write'
packages: 'write'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/pluralsh/kairos-plural-cli
docker.io/pluralsh/kairos-plural-cli
tags: |
type=sha
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v3
with:
username: mjgpluralsh
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "."
file: "./cli.Dockerfile"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GIT_COMMIT=${{ github.sha }}

0 comments on commit 71cb202

Please sign in to comment.