Hotfix values file defaults #35
This file contains hidden or 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 and Push Docker Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'charts/**' | |
- 'app/**' | |
- 'Dockerfile' | |
env: | |
IMAGE_NAME: cert-manager-key-vault-sync | |
CHART_NAME: cert-manager-key-vault-sync-chart | |
REPOSITORY_NAME: rdvansloten | |
jobs: | |
build-and-push: | |
name: Build and Push Docker Image | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install yq | |
run: | | |
sudo apt update | |
sudo apt install snap -y | |
sudo snap install yq | |
- name: Read version from YAML | |
id: read_version | |
run: | | |
version=$(cat ./charts/${{ env.CHART_NAME }}/Chart.yaml | grep appVersion | awk '{print $2}') | |
echo "APP_VERSION=$version" >> "$GITHUB_ENV" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PAT }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: . | |
push: true | |
tags: ${{ env.REPOSITORY_NAME }}/${{ env.IMAGE_NAME }}:latest, ${{ env.REPOSITORY_NAME }}/${{ env.IMAGE_NAME }}:${{ env.APP_VERSION }} | |
- name: Logout from Docker Hub | |
run: docker logout |