Skip to content

chore: dump version to 2.2.14 #86

chore: dump version to 2.2.14

chore: dump version to 2.2.14 #86

name: Build Reloader Image
on:
push:
branches:
- main
- "main-*"
tags:
- "*"
paths:
- sidecar/reloader/**
jobs:
build-reloader-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get reloader image version
id: version
run: |
VERSION=$(cat sidecar/reloader/VERSION)
echo "::set-output name=version::${VERSION}"
- name: Get container registry
id: registry
run: |
if [ ${{ github.ref_type }} = "tag" ]; then
echo "::set-output name=registry::docker.io"
else
echo "::set-output name=registry::ghcr.io"
fi
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
if: github.ref_type == 'tag'
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: docker/login-action@v2
if: github.ref_type == 'branch'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ steps.registry.outputs.registry }}/${{ github.repository }}-reloader
flavor: |
latest=true
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
- uses: docker/build-push-action@v3
with:
push: true
pull: true
no-cache: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: sidecar/reloader