Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Nov 13, 2024
1 parent 4dfecfa commit 40ca98b
Showing 1 changed file with 46 additions and 6 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,47 @@ jobs:
tag: ${{ inputs.tag }}
platforms: ${{ inputs.all_platforms && 'linux/amd64,linux/arm64' || 'linux/amd64' }}

create-github-release:
create-docker-info:
runs-on: ubuntu-latest
needs: prod-container-build
steps:
- name: Create GitHub Release
- name: Create Docker Image Info File
run: echo "Docker image - ghcr.io/${{ github.repository_owner }}/cosi:${{ inputs.tag }}" > docker-image-info.txt

- name: Upload Docker Info as Artifact
uses: actions/upload-artifact@v4
with:
name: docker-image-info
path: docker-image-info.txt

create-github-release:
runs-on: ubuntu-latest
needs: [create-docker-info, package-helm-chart]
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Download Helm Chart Artifact
uses: actions/download-artifact@v4
with:
name: helm-chart

- name: Download Docker Info Artifact
uses: actions/download-artifact@v4
with:
name: docker-image-info

- name: Upload Assets and Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target_commitish: ${{ github.sha }}
files: |
docker-image-info.txt
scality-cosi-driver-${{ inputs.tag }}.tgz
tag_name: ${{ inputs.tag }}
name: Release ${{ inputs.tag }}
generate_release_notes: true
body: "Release for tag ${{ inputs.tag }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-helm-chart:
runs-on: ubuntu-latest
Expand All @@ -62,6 +90,18 @@ jobs:
name: helm-chart
path: scality-cosi-driver-${{ inputs.tag }}.tgz

- 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 }}

- name: Push helm chart to ghcr.io
run: helm push scality-cosi-driver-${{ inputs.tag }}.tgz oci://ghcr.io/${{ github.repository }}/helm-charts

Expand Down

0 comments on commit 40ca98b

Please sign in to comment.