Skip to content

Merge remote-tracking branch 'origin/main' #1

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #1

Workflow file for this run

name: "Publish Release from tag"
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
environment:
name: k8s-operator
name: Release
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version-file: 'go.work'
cache: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: set Env
id: github-ver
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build and Push docker image
run: |
cd opensearch-operator
export IMG=ghcr.io/maibornwolff/opensearch-operator:$RELEASE_VERSION
docker buildx build -t $IMG --platform="linux/amd64,linux/arm,linux/arm64" . -f Dockerfile --push
- name: Make sure helm chart has correct versions
run: |
sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml
sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml
sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml
sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.14.3
- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@master
with:
charts_dir: charts/
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v2
id: create_release
with:
draft: true
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: ${{ github.ref }}