Skip to content

fix: image name for custom naming scheme #4

fix: image name for custom naming scheme

fix: image name for custom naming scheme #4

Workflow file for this run

name: Create and publish toolkit base image

Check failure on line 1 in .github/workflows/toolkit-base.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/toolkit-base.yaml

Invalid workflow file

(Line: 10, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMAGE_OWNER
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_SUFFIX: eks-toolkit-base
IMAGE_OWNER: ${{ github.repository_owner }}
IMAGE_NAME: ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_SUFFIX }}
BUILD_CONTEXT: tests/images/toolkit-base/
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=,suffix=,enable=true,event=push,length=7
type=raw,value=latest,enable=true
- name: Extract latest tool versions
id: versions
working-directory: ${{ env.BUILD_CONTEXT }}
run: |
chmod +x ./get_versions.sh
./get_versions.sh
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ env.BUILD_CONTEXT }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
KUBECTL_VERSION=${{ steps.versions.outputs.k8s_tag }}
HELM_VERSION=${{ steps.versions.outputs.helm_version }}
KUSTOMIZE_VERSION=${{ steps.versions.outputs.kustomize_version }}
KUBESEAL_VERSION=${{ steps.versions.outputs.kubeseal_version }}
KREW_VERSION=${{ steps.versions.outputs.krew_version }}
VALS_VERSION=${{ steps.versions.outputs.vals_version }}
KUBECONFORM_VERSION=${{ steps.versions.outputs.kubeconform_version }}