Skip to content

chore(deps): bump k8s.io/api from 0.28.3 to 0.28.4 (#96) #103

chore(deps): bump k8s.io/api from 0.28.3 to 0.28.4 (#96)

chore(deps): bump k8s.io/api from 0.28.3 to 0.28.4 (#96) #103

Workflow file for this run

---
name: publish-image
on:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
# Publish `v1.2.3` tags as releases.
tags:
- v*
env:
IMAGE_NAME: pod-image-swap-webhook
jobs:
publish-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: docker build -f Dockerfile -t $IMAGE_NAME .
- name: Login to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Use Docker `latest` tag convention for `main` branch
if [ "$VERSION" == "main" ]; then
VERSION=latest
fi
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Scan image
uses: azure/container-scan@v0
with:
image-name: ${{ env.IMAGE_NAME }}