This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
forked from kubernetes-sigs/cosi-driver-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.93 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to be released (e.g., v1.0.0)"
required: true
jobs:
# Job 1: Build and Push Docker Image (Independent job)
prod-container-build:
permissions:
contents: read
packages: write
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
with:
context: .
name: cosi
namespace: ${{ github.repository_owner }}
tag: ${{ inputs.tag }}
# platforms: linux/amd64,linux/arm64
# Job 2: Package Helm Chart (Runs independently of Docker build)
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: Package Helm Chart
run: |
helm package ./helm/scality-cosi-driver --version ${{ inputs.tag }} --app-version ${{ inputs.tag }}
# Job 3: Create Docker Image Info File (Depends on Docker build)
create-docker-info:
runs-on: ubuntu-latest
needs: prod-container-build
steps:
- name: Create Docker Image Info File
run: echo "ghcr.io/${{ github.repository_owner }}/cosi:${{ inputs.tag }}" > docker-image-info.txt
# Job 4: Create GitHub Release (Depends on Docker info and Helm chart packaging)
create-github-release:
runs-on: ubuntu-latest
needs: [create-docker-info, 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: |
docker-image-info.txt
scality-cosi-driver-${{ inputs.tag }}.tgz
tag_name: ${{ inputs.tag }}
name: Release ${{ inputs.tag }}
body: "Release for tag ${{ inputs.tag }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}