Skip to content

Create docker-publish.yml #1

Create docker-publish.yml

Create docker-publish.yml #1

name: Build and Push Docker Image
on:
push:
branches:
- main # Trigger on pushes to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ secrets.DOCKER_IMAGE }}:latest
push: true
- name: Verify Helm binary inside the image
run: |
docker run --rm ${{ secrets.DOCKER_IMAGE }}:latest helm version