Skip to content

Bump docker/build-push-action from 5 to 6 #188

Bump docker/build-push-action from 5 to 6

Bump docker/build-push-action from 5 to 6 #188

name: ci
on:
push:
branches:
- 'main'
paths-ignore:
- "**.md"
- LICENSE
- ".github/dependabot.yml"
pull_request:
branches:
- 'main'
paths-ignore:
- "**.md"
- LICENSE
- ".github/dependabot.yml"
workflow_dispatch:
release:
types: [published, edited]
jobs:
build-and-push-images:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Read environment file
run: cat .env >> ${GITHUB_ENV}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
dtzar/helm-kubectl
ghcr.io/dtzar/helm-kubectl
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/ppc64le,linux/s390x
build-args: |
KUBE_VERSION=${{ env.KUBE_VERSION }}
HELM_VERSION=${{ env.HELM_VERSION }}
YQ_VERSION=${{ env.YQ_VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}