Skip to content

Build Container and Helm Chart from v0.2.1 by @george-zubrienko #39

Build Container and Helm Chart from v0.2.1 by @george-zubrienko

Build Container and Helm Chart from v0.2.1 by @george-zubrienko #39

Workflow file for this run

name: Build Image
run-name: Build Container and Helm Chart from ${{github.ref_name}} by @${{ github.actor }}
on: workflow_dispatch
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build_image:
name: Build Docker Image and Helm Charts
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get project version
uses: SneaksAndData/github-actions/[email protected]
id: version
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{steps.version.outputs.version}}
flavor:
latest=false
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
use: true
platforms: linux/arm64,linux/amd64
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: .container/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64,linux/amd64
- name: Build and Push Chart
uses: SneaksAndData/github-actions/[email protected]
with:
application: nexus-configuration-controller
app_version: ${{ steps.meta.outputs.version }}
container_registry_user: ${{ github.actor }}
container_registry_token: ${{ secrets.GITHUB_TOKEN }}
container_registry_address: ghcr.io/sneaksanddata/