From a177171a4a03f47d5ae6b229358c0d1233b8e4b4 Mon Sep 17 00:00:00 2001 From: rpancham Date: Fri, 31 May 2024 19:58:14 +0530 Subject: [PATCH 1/7] Add workflow to Trigger build on PR add LGTM and Create Tag and Release with Changelog and push image to quay --- .github/workflows/pr-create-release-build.yml | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 .github/workflows/pr-create-release-build.yml diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml new file mode 100644 index 0000000000..8ccb5c62be --- /dev/null +++ b/.github/workflows/pr-create-release-build.yml @@ -0,0 +1,239 @@ +name: Trigger build on PR add LGTM and Create Tag and Release with Changelog and push image to quay + +on: + workflow_dispatch: + inputs: + tag_name: + description: 'Tag name for the new release and push the image to quay' + required: true + +permissions: + contents: write + packages: write + pull-requests: write + +jobs: + check-prev-tag: + runs-on: ubuntu-latest + outputs: + old_tag: ${{ steps.get_tag.outputs.old_tag_name }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Get latest tag + id: get_tag + run: | + echo "old_tag_name=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | grep -v '{}' | sort -V | tail -n1)" >> $GITHUB_OUTPUT + - name: print tag + id: print_tag + run: | + echo "Old Tag=${{ steps.get_tag.outputs.old_tag_name }}" + echo "NEW_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV + echo "$(basename ${{ github.ref }})" + + - name: Check if tag exists + id: check_tag + run: | + import sys + import subprocess + tag_name = "${{ github.event.inputs.tag_name }}" + command = ['git', 'tag', '-l', tag_name] + output = subprocess.check_output(command, stderr=subprocess.STDOUT) + if output.decode() != "": + print(f"Error: Tag '{tag_name}' already exists.", file=sys.stderr) + sys.exit(1) + else: + print(f"Tag '{tag_name}' does not exists.") + + shell: python + continue-on-error: false + + create-pr: + runs-on: ubuntu-latest + needs: check-prev-tag + env: + GITHUB_BRANCH: ${{ github.ref }} + outputs: + pr_number: ${{ steps.create-pull-request.outputs.pr_number }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Set up Git + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + - name: Create and checkout new branch + id: create_branch + run: | + BRANCH_NAME="update-param-env-${{ github.event.inputs.tag_name }}" + echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV + git checkout -b $BRANCH_NAME + - name: Update params.env with new release version + run: | + sed -i 's|:v[0-9.]*\b|:${{ github.event.inputs.tag_name }}|gm' config/overlays/odh/params.env + - name: Commit changes + run: | + git add config/overlays/odh/params.env + git commit -m "Update image refs for odh release" + git push origin $BRANCH_NAME + - name: Create Pull Request + id: create-pull-request + run: | + PR_URL=$(gh pr create -B ${{ github.ref }} -H ${{ env.BRANCH_NAME }} --title '[ODH Release] Update images for ${{ github.event.inputs.tag_name }}' --body 'Update images for ${{ github.event.inputs.tag_name }}') + echo "PR_URL=${PR_URL}" >> $GITHUB_ENV + pr_number=$(echo "$PR_URL" | grep -o -E '[0-9]+$') + echo "pr_number=${pr_number}" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ github.token }} + + wait-checks: + runs-on: ubuntu-latest + needs: [ check-prev-tag,create-pr ] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - name: Watching PR if Checks finished without errors + id: wait-checks + run: + gh pr checks ${{ needs.create-pr.outputs.pr_number }} --watch --fail-fast + env: + GH_TOKEN: ${{ github.token }} + comment-lgtm: + needs: [ check-prev-tag,create-pr,wait-checks ] + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - name: Add comment to trigger lgtm label + if: ${{ needs.wait-checks.result == 'success' }} + run: | + gh pr comment ${{ needs.create-pr.outputs.pr_number }} --body "/lgtm" + gh pr edit ${{ needs.create-pr.outputs.pr_number }} --add-label lgtm + env: + GH_TOKEN: ${{ github.token }} + + wait-lgtm: + runs-on: ubuntu-latest + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm ] + outputs: + has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Wait for lgtm label + id: wait-lgtm-label + run: | + for i in {1..60}; do + LABEL=$(gh pr view ${{ needs.create-pr.outputs.pr_number }} --json labels --jq '.labels[].name') + echo "Labels: $LABEL" + if echo "$LABEL" | grep -qw "lgtm"; then + has_lgtm=true + echo "has_lgtm=${has_lgtm}" >> $GITHUB_OUTPUT + break + else + echo "Waiting for lgtm label... (attempt $i)" + sleep 60 + fi + done + + if ! $has_lgtm; then + echo "Error: 'lgtm' label not found after waiting." + exit 1 + fi + env: + GH_TOKEN: ${{ github.token }} + + + docker-build: + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm] + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Build Docker image + run: docker build -t quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} . + + - name: Push Docker image + run: docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} + + + - uses: peter-evans/find-comment@v3 + name: Find Comment + id: fc + with: + issue-number: ${{ needs.create-pr.outputs.pr_number }} + comment-author: 'github-actions[bot]' + body-includes: PR image build and manifest generation completed successfully + - uses: peter-evans/create-or-update-comment@v4 + name: Generate/update success message comment + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ needs.create-pr.outputs.pr_number }} + edit-mode: replace + body: | + PR image build and manifest generation completed successfully! + + 📦 [PR image](https://quay.io/opendatahub/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }}: `quay.io/opendatahub/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }}` + + changelog: + name: Changelog + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,docker-build] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + - name: Set up Git + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + - name: Create Tag + id: create_tag + run: | + git tag -a ${{ github.event.inputs.tag_name }} -m "Prepare for ODH release ${{ github.event.inputs.tag_name }}" + git push origin ${{ github.event.inputs.tag_name }} + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + token: ${{ github.token }} + tag_name: ${{ github.event.inputs.tag_name }} + prerelease: false + draft: false + #this takes the path of payload to upload as an asset in the changelog + files: bin/* + generate_release_notes: true + name: ${{ github.event.inputs.tag_name }} + \ No newline at end of file From 365c4900f59edc6d30977236a762b4370549de5b Mon Sep 17 00:00:00 2001 From: rpancham Date: Thu, 6 Jun 2024 13:53:40 +0530 Subject: [PATCH 2/7] Workflow to trigger a PR and rename Tag --- .github/workflows/pr-create-release-build.yml | 113 +++++++++--------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 8ccb5c62be..2339c66c0c 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: tag_name: - description: 'Tag name for the new release and push the image to quay' + description: 'Tag name for the new release' required: true permissions: @@ -34,7 +34,6 @@ jobs: echo "Old Tag=${{ steps.get_tag.outputs.old_tag_name }}" echo "NEW_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV echo "$(basename ${{ github.ref }})" - - name: Check if tag exists id: check_tag run: | @@ -122,54 +121,44 @@ jobs: if: ${{ needs.wait-checks.result == 'success' }} run: | gh pr comment ${{ needs.create-pr.outputs.pr_number }} --body "/lgtm" - gh pr edit ${{ needs.create-pr.outputs.pr_number }} --add-label lgtm env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ github.token }} wait-lgtm: runs-on: ubuntu-latest - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm ] + needs: [check-prev-tag, create-pr, wait-checks, comment-lgtm] outputs: has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} + has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - - name: Wait for lgtm label + steps: + - name: Wait for LGTM label + uses: nick-fields/retry@v3 id: wait-lgtm-label - run: | - for i in {1..60}; do + with: + timeout_minutes: 120 + max_attempts: 60 + retry_wait_seconds: 120 + shell: bash + command: | LABEL=$(gh pr view ${{ needs.create-pr.outputs.pr_number }} --json labels --jq '.labels[].name') echo "Labels: $LABEL" if echo "$LABEL" | grep -qw "lgtm"; then - has_lgtm=true - echo "has_lgtm=${has_lgtm}" >> $GITHUB_OUTPUT - break + has_lgtm=true + echo "has_lgtm=${has_lgtm}" >> $GITHUB_OUTPUT else - echo "Waiting for lgtm label... (attempt $i)" - sleep 60 - fi - done - - if ! $has_lgtm; then - echo "Error: 'lgtm' label not found after waiting." - exit 1 - fi + echo "LGTM label not found. Retrying..." + exit 1 env: - GH_TOKEN: ${{ github.token }} - + GH_TOKEN: ${{ github.token }} - docker-build: + Rename-image: needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm] runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -177,37 +166,47 @@ jobs: uses: docker/login-action@v2 with: registry: quay.io - username: ${{ secrets.QUAY_USER }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build Docker image - run: docker build -t quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} . - - - name: Push Docker image - run: docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} - + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.Q_PASSWORD }} - - uses: peter-evans/find-comment@v3 - name: Find Comment - id: fc - with: - issue-number: ${{ needs.create-pr.outputs.pr_number }} - comment-author: 'github-actions[bot]' - body-includes: PR image build and manifest generation completed successfully - - uses: peter-evans/create-or-update-comment@v4 - name: Generate/update success message comment + - name: Wait for PR to be merged + uses: nick-fields/retry@v3 with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ needs.create-pr.outputs.pr_number }} - edit-mode: replace - body: | - PR image build and manifest generation completed successfully! - - 📦 [PR image](https://quay.io/opendatahub/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }}: `quay.io/opendatahub/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }}` + timeout_minutes: 60 + max_attempts: 60 + retry_wait_seconds: 120 + shell: bash + command: | + PR_STATUS=$(gh pr view ${{ github.event.client_payload.pr_number }} --json state --jq '.state') + echo "PR Status: $PR_STATUS" + if [ "$PR_STATUS" != "MERGED" ]; then + echo "PR is not yet merged. Retrying..." + exit 1 + fi + env: + GH_TOKEN: ${{ github.token }} + - name: pull image (with retry) + uses: nick-fields/retry@v3 + with: + timeout_minutes: 2 + max_attempts: 3 + retry_wait_seconds: 120 + shell: bash + command: docker pull quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} + - name: Rename image with new tag name + uses: nick-fields/retry@v3 + with: + timeout_minutes: 2 + max_attempts: 3 + retry_wait_seconds: 120 + shell: bash + command: | + docker tag quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} + docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} changelog: name: Changelog - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,docker-build] + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,Rename-image] runs-on: ubuntu-latest steps: - name: Checkout From 65d43c45a9236c04db995b184fb8effe7d55dee9 Mon Sep 17 00:00:00 2001 From: rpancham Date: Thu, 6 Jun 2024 17:31:55 +0530 Subject: [PATCH 3/7] Modified the workflow --- .github/workflows/pr-create-release-build.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 2339c66c0c..71bd26c23c 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -27,8 +27,9 @@ jobs: - name: Get latest tag id: get_tag run: | - echo "old_tag_name=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | grep -v '{}' | sort -V | tail -n1)" >> $GITHUB_OUTPUT - - name: print tag + old_tag_name=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | grep -v '{}' | sort -V | tail -n1) + echo "old_tag_name=${old_tag_name}" >> $GITHUB_OUTPUT + - name: Print tags id: print_tag run: | echo "Old Tag=${{ steps.get_tag.outputs.old_tag_name }}" @@ -129,10 +130,6 @@ jobs: needs: [check-prev-tag, create-pr, wait-checks, comment-lgtm] outputs: has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - - has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - steps: - name: Wait for LGTM label uses: nick-fields/retry@v3 @@ -154,7 +151,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} - Rename-image: + rename-image: needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm] runs-on: ubuntu-latest @@ -177,7 +174,7 @@ jobs: retry_wait_seconds: 120 shell: bash command: | - PR_STATUS=$(gh pr view ${{ github.event.client_payload.pr_number }} --json state --jq '.state') + PR_STATUS=$(gh pr view ${{ needs.create-pr.outputs.pr_number }} --json state --jq '.state') echo "PR Status: $PR_STATUS" if [ "$PR_STATUS" != "MERGED" ]; then echo "PR is not yet merged. Retrying..." @@ -206,7 +203,7 @@ jobs: docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} changelog: name: Changelog - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,Rename-image] + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,rename-image] runs-on: ubuntu-latest steps: - name: Checkout @@ -231,7 +228,6 @@ jobs: tag_name: ${{ github.event.inputs.tag_name }} prerelease: false draft: false - #this takes the path of payload to upload as an asset in the changelog files: bin/* generate_release_notes: true name: ${{ github.event.inputs.tag_name }} From 722788bd164e384ea8cfbb5797023f5e93c62226 Mon Sep 17 00:00:00 2001 From: rpancham Date: Thu, 6 Jun 2024 23:06:34 +0530 Subject: [PATCH 4/7] Remove wait-lgtm from workflow --- .github/workflows/pr-create-release-build.yml | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 71bd26c23c..4a32ca122b 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -125,34 +125,8 @@ jobs: env: GH_TOKEN: ${{ github.token }} - wait-lgtm: - runs-on: ubuntu-latest - needs: [check-prev-tag, create-pr, wait-checks, comment-lgtm] - outputs: - has_lgtm: ${{ steps.wait-lgtm-label.outputs.has_lgtm }} - steps: - - name: Wait for LGTM label - uses: nick-fields/retry@v3 - id: wait-lgtm-label - with: - timeout_minutes: 120 - max_attempts: 60 - retry_wait_seconds: 120 - shell: bash - command: | - LABEL=$(gh pr view ${{ needs.create-pr.outputs.pr_number }} --json labels --jq '.labels[].name') - echo "Labels: $LABEL" - if echo "$LABEL" | grep -qw "lgtm"; then - has_lgtm=true - echo "has_lgtm=${has_lgtm}" >> $GITHUB_OUTPUT - else - echo "LGTM label not found. Retrying..." - exit 1 - env: - GH_TOKEN: ${{ github.token }} - rename-image: - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm] + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm] runs-on: ubuntu-latest steps: @@ -203,7 +177,7 @@ jobs: docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} changelog: name: Changelog - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,wait-lgtm,rename-image] + needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,rename-image] runs-on: ubuntu-latest steps: - name: Checkout @@ -230,5 +204,4 @@ jobs: draft: false files: bin/* generate_release_notes: true - name: ${{ github.event.inputs.tag_name }} - \ No newline at end of file + name: ${{ github.event.inputs.tag_name }} \ No newline at end of file From cd4ae27486dcdd3fcec575ffd72574b98f7d7007 Mon Sep 17 00:00:00 2001 From: rpancham Date: Thu, 13 Jun 2024 11:28:39 +0530 Subject: [PATCH 5/7] Remove wait-lgtm from workflow and increase timeout time --- .github/workflows/pr-create-release-build.yml | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 4a32ca122b..3ea4856028 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -98,35 +98,15 @@ jobs: runs-on: ubuntu-latest needs: [ check-prev-tag,create-pr ] steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - name: Watching PR if Checks finished without errors id: wait-checks run: gh pr checks ${{ needs.create-pr.outputs.pr_number }} --watch --fail-fast env: GH_TOKEN: ${{ github.token }} - comment-lgtm: - needs: [ check-prev-tag,create-pr,wait-checks ] - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Add comment to trigger lgtm label - if: ${{ needs.wait-checks.result == 'success' }} - run: | - gh pr comment ${{ needs.create-pr.outputs.pr_number }} --body "/lgtm" - env: - GH_TOKEN: ${{ github.token }} - + rename-image: - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm] + needs: [ check-prev-tag,create-pr,wait-checks] runs-on: ubuntu-latest steps: @@ -143,9 +123,9 @@ jobs: - name: Wait for PR to be merged uses: nick-fields/retry@v3 with: - timeout_minutes: 60 - max_attempts: 60 - retry_wait_seconds: 120 + timeout_minutes: 240 + max_attempts: 48 + retry_wait_seconds: 300 shell: bash command: | PR_STATUS=$(gh pr view ${{ needs.create-pr.outputs.pr_number }} --json state --jq '.state') @@ -160,24 +140,36 @@ jobs: - name: pull image (with retry) uses: nick-fields/retry@v3 with: - timeout_minutes: 2 - max_attempts: 3 + timeout_minutes: 20 + max_attempts: 10 retry_wait_seconds: 120 shell: bash command: docker pull quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} + docker pull quay.io/${{ vars.QUAY_OWNER }}/kserve-storage-initializer:pr-${{ needs.create-pr.outputs.pr_number }} + docker pull quay.io/${{ vars.QUAY_OWNER }}/kserve-router:pr-${{ needs.create-pr.outputs.pr_number }} + docker pull quay.io/${{ vars.QUAY_OWNER }}/kserve-agent:pr-${{ needs.create-pr.outputs.pr_number }} - name: Rename image with new tag name uses: nick-fields/retry@v3 with: - timeout_minutes: 2 - max_attempts: 3 + timeout_minutes: 20 + max_attempts: 10 retry_wait_seconds: 120 shell: bash command: | docker tag quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:pr-${{ needs.create-pr.outputs.pr_number }} quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-controller:${{ github.event.inputs.tag_name }} + + docker tag quay.io/${{ vars.QUAY_OWNER }}/kserve-storage-initializer:pr-${{ needs.create-pr.outputs.pr_number }} quay.io/${{ vars.QUAY_OWNER }}/kserve-storage-initializer:${{ github.event.inputs.tag_name }} + docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-storage-initializer:${{ github.event.inputs.tag_name }} + + docker tag quay.io/${{ vars.QUAY_OWNER }}//kserve-router:pr-${{ needs.create-pr.outputs.pr_number }} quay.io/${{ vars.QUAY_OWNER }}//kserve-router:${{ github.event.inputs.tag_name }} + docker push quay.io/${{ vars.QUAY_OWNER }}//kserve-router:${{ github.event.inputs.tag_name }} + + docker tag quay.io/${{ vars.QUAY_OWNER }}/kserve-agent:pr-${{ needs.create-pr.outputs.pr_number }} quay.io/${{ vars.QUAY_OWNER }}/kserve-agent:${{ github.event.inputs.tag_name }} + docker push quay.io/${{ vars.QUAY_OWNER }}/kserve-agent:${{ github.event.inputs.tag_name }} changelog: name: Changelog - needs: [ check-prev-tag,create-pr,wait-checks,comment-lgtm,rename-image] + needs: [ check-prev-tag,create-pr,wait-checks,rename-image] runs-on: ubuntu-latest steps: - name: Checkout From fe70b14a6fb40a71bca94921a6f54cb50f43c506 Mon Sep 17 00:00:00 2001 From: rpancham Date: Wed, 19 Jun 2024 11:56:01 +0530 Subject: [PATCH 6/7] modify variable name --- .github/workflows/pr-create-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 3ea4856028..069decb7a2 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -118,7 +118,7 @@ jobs: with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.Q_PASSWORD }} + password: ${{ secrets.QUAY_PASSWORD }} - name: Wait for PR to be merged uses: nick-fields/retry@v3 From f6b8f8d48d12cecd13dc816f9334aa3c29034736 Mon Sep 17 00:00:00 2001 From: rpancham Date: Thu, 20 Jun 2024 19:20:24 +0530 Subject: [PATCH 7/7] Modified the quay_username --- .github/workflows/pr-create-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-create-release-build.yml b/.github/workflows/pr-create-release-build.yml index 069decb7a2..4482372bbf 100644 --- a/.github/workflows/pr-create-release-build.yml +++ b/.github/workflows/pr-create-release-build.yml @@ -117,7 +117,7 @@ jobs: uses: docker/login-action@v2 with: registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} + username: ${{ secrets.QUAY_USER }} password: ${{ secrets.QUAY_PASSWORD }} - name: Wait for PR to be merged