Merge pull request #900 from projectsyn/renovate/docker.io-alpine-3.x #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Push Kapitan Image | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- master | |
paths: | |
- tools/Dockerfile.kapitan | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
IMAGE: docker.io/projectsyn/kapitan | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set image version | |
run: | | |
echo "VERSION=$(grep "KAPITAN_VERSION=" tools/Dockerfile.kapitan | cut -d= -f2)" >> ${GITHUB_ENV} | |
- name: Build image | |
run: docker build -f tools/Dockerfile.kapitan -t ${IMAGE}:${VERSION} tools/ | |
- name: Push image | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login docker.io --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" | |
docker push "${IMAGE}:${VERSION}" |