From 39365989f194221fabca768d309bfaf22f6bd225 Mon Sep 17 00:00:00 2001 From: Anish Asthana Date: Fri, 7 Jul 2023 17:12:20 -0400 Subject: [PATCH 1/3] GitHub Release Action Fixes This fixes a few issues that were discovered in the CodeFlare 0.0.5 release 1. Tag image as stable, not latest. We have switched over to using podman as well 2. Update github release step to include release notes 3. Move github tag + release step to end Signed-off-by: Anish Asthana --- .github/workflows/release.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 570707391..815563880 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,9 +6,9 @@ on: release-version: type: string required: true - description: 'Version number (for example: 0.1.0)' - is-latest: - description: 'Select if the built image should be tagged as latest' + description: 'Version number (This should not include `v`, for example: 0.1.0)' + is-stable: + description: 'Select if the built image should be tagged as stable' required: true type: boolean quay-organization: @@ -57,25 +57,27 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: file_pattern: 'docs' - commit_message: "Changes in docs for release: v${{ github.event.inputs.release-version }}" - - name: Create Github release - uses: ncipollo/release-action@v1 - with: - tag: "v${{ github.event.inputs.release-version }}" + commit_message: "Changes in docs for release: ${{ github.event.inputs.release-version }}" - name: Image Build run: | cd custom-nb-image - docker build --build-arg SDK_VERSION="${{ github.event.inputs.release-version }}" -t quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} . - docker tag quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} quay.io/${{ github.event.inputs.quay-organization }}/notebook:latest + podman build --build-arg SDK_VERSION="${{ github.event.inputs.release-version }}" -t quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} . + - name: Login to Quay.io uses: docker/login-action@v2 with: registry: quay.io username: ${{ secrets.QUAY_ID }} password: ${{ secrets.QUAY_TOKEN }} + - name: Image Push - run: docker push quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} - - name: Image Push Latest - if: ${{ inputs.is-latest }} - run: docker push quay.io/${{ github.event.inputs.quay-organization }}/notebook:latest + run: | + podman push quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} + podman push quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} quay.io/${{ github.event.inputs.quay-organization }}/notebook:stable + + - name: Create Github release + uses: ncipollo/release-action@v1 + with: + tag: "${{ github.event.inputs.release-version }}" + generateReleaseNotes: true From 13fd88e5999ec401bf4b487c7ac8313a9a9790b0 Mon Sep 17 00:00:00 2001 From: Anish Asthana Date: Sat, 8 Jul 2023 14:07:23 -0400 Subject: [PATCH 2/3] Only push to stable branch if `is-stable` is selected Co-authored-by: ted chang --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 815563880..88d2ca0fd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -74,6 +74,10 @@ jobs: - name: Image Push run: | podman push quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} + + - name: Image Push Stable + if: ${{github.event.inputs.is-stable}} + run: | podman push quay.io/${{ github.event.inputs.quay-organization }}/notebook:v${{ github.event.inputs.release-version }} quay.io/${{ github.event.inputs.quay-organization }}/notebook:stable - name: Create Github release From 57297086cfa5cc09d91c94947fd5e2c09476fd42 Mon Sep 17 00:00:00 2001 From: Anish Asthana Date: Tue, 11 Jul 2023 09:20:39 -0400 Subject: [PATCH 3/3] Add 'v' to tag Signed-off-by: Anish Asthana --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 88d2ca0fd..bce545d4b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -83,5 +83,5 @@ jobs: - name: Create Github release uses: ncipollo/release-action@v1 with: - tag: "${{ github.event.inputs.release-version }}" + tag: "v${{ github.event.inputs.release-version }}" generateReleaseNotes: true