Skip to content

kubectl-shell

kubectl-shell #16

Workflow file for this run

name: "kubectl-shell"
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- 'kubectl-shell/**'
pull_request:
branches:
- develop
paths:
- 'kubectl-shell/**'
env:
DOCKER_HUB_REPO: portainerci/kubectl-shell
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
build_images:
runs-on: ubuntu-latest
steps:
- name: "[preparation] checkout"
uses: actions/checkout@v4.1.1
- name: "[preparation] set up qemu"
uses: docker/setup-qemu-action@v3.2.0
- name: "[preparation] set up docker context for buildx"
run: docker context create builders
- name: "[preparation] set up docker buildx"
uses: docker/setup-buildx-action@v3.6.1
with:
endpoint: builders
driver-opts: image=moby/buildkit:v0.16.0
platforms: linux/amd64,linux/arm64,linux/arm,linux/ppc64le
- name: "[preparation] docker login"
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: "[metadata] generate image tags"
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_HUB_REPO }}
tags: |
type=ref,event=push,pattern=develop,format=latest,group=push
type=ref,event=pull_request,format=pr{{ event.number }},group=pull_request
type=raw,event=workflow_dispatch,format=manual-${{ github.run_number }},group=workflow_dispatch
- name: "build and push images"
uses: docker/build-push-action@v6.7.0
with:
context: kubectl-shell/
tags: ${{ steps.meta.outputs.tags }}
build-args: |
HELM_VERSION=v3.15.4
KUBERNETES_RELEASE=v1.31.0
platforms: |
linux/amd64
linux/arm64
linux/arm
linux/ppc64le
sbom: true
provenance: true
push: true