Skip to content

chore(deps): bump alpine from 3.19.1 to 3.20.0 (#228) #82

chore(deps): bump alpine from 3.19.1 to 3.20.0 (#228)

chore(deps): bump alpine from 3.19.1 to 3.20.0 (#228) #82

Workflow file for this run

---
name: publish-image
on:
push:
# Publish `master` as `latest` image tag.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
env:
IMAGE_NAME: ingress-monitor-controller
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 `master` branch
if [ "$VERSION" == "master" ]; then
VERSION=latest
fi
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION