Skip to content

test build

test build #1

Workflow file for this run

name: Build

Check failure on line 1 in .github/workflows/build-kubectl.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-kubectl.yml

Invalid workflow file

(Line: 37, Col: 12): Job 'build-kubectl' depends on unknown job 'kubectl_versions'.
on:
workflow_call:
inputs:
tags:
type: string
description: The Docker Tags (see docker/metadata-action@v4 for available values)
required: true
jobs:
skopeo:
name: kubectl_versions
runs-on: ubuntu-latest
outputs:
kubectl_versions: ${{ steps.kubectl_versions.ouputs.kubectl_versions }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 'Set up skopeo'
uses: warjiang/setup-skopeo@main
with:
version: latest
- name: 'versions'
id: kubectl_versions
run: |
python --version
export ALL_VERSIONS=$(skopeo list-tags docker://registry.k8s.io/kubectl | jq -r '.Tags | .[]| select(. | match("v[0-9].[0-9]{2}.[0-9]$"))')
export VERSIONS=$(python ./get_kubectl_versions.py)
echo ${VERSIONS}
echo "kubectl_versions=${VERSIONS}" >> $GITHUB_OUTPUT
build-kubectl:
runs-on: ubuntu-latest
needs: ["kubectl_versions"]
strategy:
matrix:
version: ${{ needs.kubectl_versions.outputs.kubectl_versions }}
steps:
- name: Build-kubetcl-with-shell
uses: coopTilleuls/action-docker-build-push@custom-tags
with:
IMAGE_NAME: kubectl
BUILD_CONTEXT: ./kubectl
BUILD_ARGS: ${{ matrix.version }}
BUILD_TARGET: debian-kubectl
REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }}
IMAGE_REPOSITORY: ghcr.io/cooptilleuls/sre
CUSTOM_TAG: ${{ matrix.version }}