Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to be released (e.g., v1.0.0)"
required: true
all_platforms:
description: "Build for all platforms (linux/amd64,linux/arm64) or just linux/amd64"
required: false
type: boolean
default: false
jobs:
prod-container-build:
permissions:
contents: read
packages: write
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
with:
context: .
name: cosi-driver
namespace: ${{ github.repository_owner }}
tag: ${{ inputs.tag }}
platforms: ${{ inputs.all_platforms && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
create-github-release:
runs-on: ubuntu-latest
needs: [package-helm-chart, package-helm-chart]
steps:
# - name: Check out repository
# uses: actions/checkout@v4
- name: Upload Assets and Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
scality-cosi-driver-${{ inputs.tag }}.tgz
tag_name: ${{ inputs.tag }}
name: Release ${{ inputs.tag }}
body: |
Release for tag ${{ inputs.tag }}
### Docker Image:
The Docker image for this release is available at:
```
ghcr.io/${{ github.repository }}:${{ inputs.tag }}
```
### Helm Chart:
You can install the Helm chart using the following command:
```
helm install scality-cosi-driver oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}
```
### Helm Chart Details:
To view details of the chart:
```
helm show all oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}
```
### Template the Helm Chart:
To render the Helm templates:
```
helm template oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}
```
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package-helm-chart:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.16.2
- name: login to ghcr.io with helm
run: helm registry login -u actions -p ${{ github.token }} ghcr.io
- name: Package Helm Chart
run: |
helm package ./helm/scality-cosi-driver --version ${{ inputs.tag }} --app-version ${{ inputs.tag }}
- name: Upload Helm Chart as Artifact
uses: actions/upload-artifact@v4
with:
name: helm-chart
path: scality-cosi-driver-${{ inputs.tag }}.tgz
- name: Push helm chart to ghcr.io
run: helm push scality-cosi-driver-${{ inputs.tag }}.tgz oci://ghcr.io/${{ github.repository }}/helm-charts
- name: Pull the helm chart
run: helm pull oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}
- name: Show the helm chart
run: helm show all oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}
- name: Template the helm chart
run: helm template oci://ghcr.io/${{ github.repository }}/helm-charts/scality-cosi-driver --version ${{ inputs.tag }}