Skip to content

Update repo and image tag to use gcr (#35) #4

Update repo and image tag to use gcr (#35)

Update repo and image tag to use gcr (#35) #4

Workflow file for this run

name: Release
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
build-push-helm-chart:
name: Build and push Helm chart pkg
runs-on: ubuntu-latest
env:
BUILD_DIR: charts/build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: gh-pages
path: ${{ env.BUILD_DIR }}
- name: Package Helm Chart
env:
WORKSPACE_BUILD_DIR: ${{ github.WORKSPACE }}/${{ env.BUILD_DIR}}
run: |
mkdir -p ${WORKSPACE_BUILD_DIR}
scripts/package-chart charts/conduit-operator ${WORKSPACE_BUILD_DIR} ${WORKSPACE_BUILD_DIR}/index.yaml
ls -all ${WORKSPACE_BUILD_DIR}
cat ${WORKSPACE_BUILD_DIR}/index.yaml
- name: Release Helm Chart
uses: peaceiris/actions-gh-pages@v4
env:
WORKSPACE_BUILD_DIR: ${{ github.WORKSPACE }}/${{ env.BUILD_DIR}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.WORKSPACE_BUILD_DIR }}
keep_files: true
build-push-docker-image:
name: Build and push Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
type=raw,value=latest-nightly,enable=${{ contains(github.ref, '-nightly') }}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ !contains(github.ref, '-nightly') }}
type=semver,pattern=v{{major}},enable=${{ !contains(github.ref, '-nightly') && !startsWith(github.ref, 'refs/tags/v0.') }}
labels: |
maintainer=ConduitIO
org.opencontainers.image.title=Conduit-Operator
org.opencontainers.image.description=Conduit Operator manages Conduit instances on Kubernetes
org.opencontainers.image.vendor=ConduitIO
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}