Skip to content

Remainig workflows

Remainig workflows #2

name: kubetools-kubectl
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'kubetools-kubectl/*'
- '.github/workflows/kubetools-kubectl.yml'
workflow_dispatch:
env:
REGISTRY_PATH: 'docker.io/paritytech'
IMAGE_NAME: 'kubetools-kubectl'
KUBE_VERSION: '1.26.6'
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set vars
id: vars
run: |
export COMMIT_SHA=${{ github.sha }}
echo "IMAGE_DATE_TAG='${COMMIT_SHA:0:8}-$(date +%Y%m%d)'" >> $GITHUB_OUTPUT
- name: build and push staging
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/build-push-image
with:
registry: ${{ env.REGISTRY_PATH }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
staging
build-args: |
KUBE_VERSION='${{ env.KUBE_VERSION }}'
- name: build and push
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/build-push-image
with:
registry: ${{ env.REGISTRY_PATH }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
${{ env.KUBE_VERSION }}
latest
build-args: |
KUBE_VERSION='${{ env.KUBE_VERSION }}'