Skip to content

Commit

Permalink
Added Release Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
gvatsal60 committed Sep 16, 2024
1 parent 2e2ff4e commit 0a1b264
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docker-img-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
jobs:
build:
Expand Down Expand Up @@ -53,3 +55,24 @@ jobs:
tags: ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }}
cache-from: type=registry,ref=ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }}
cache-to: type=registry,ref=ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }},mode=max
- name: Save Docker image to tarball
if: github.event_name == 'push'
run: |
docker save ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} -o ${{ env.IMG_REPO_NAME }}.tar
- name: Create GitHub release
if: github.event_name == 'push'
uses: actions/create-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
release_name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
id: create_release
- name: Upload tar as release asset
if: github.event_name == 'push'
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.IMG_REPO_NAME }}.tar
asset_name: ${{ env.IMG_REPO_NAME }}.tar
asset_content_type: application/x-tar

0 comments on commit 0a1b264

Please sign in to comment.