From 7d15aaf6c404761aa5437ba87bb74d95a2fba8aa Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:47:07 +0530 Subject: [PATCH 1/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index 7435f36570..fc5d4eedbd 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -41,3 +41,5 @@ jobs: git commit -m 'chore(automated): upgrade docker-compose.yml stable tags' gh pr merge --auto --squash + env: + GH_TOKEN: ${{ github.token }} From b6c18ab465819d32b94144e8a60efa74476d2841 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:48:47 +0530 Subject: [PATCH 2/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index fc5d4eedbd..d39c86a6bd 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -34,7 +34,7 @@ jobs: git fetch || true git push -u origin "${PR_BRANCH}" --force-with-lease - PR_ID=$(gh pr list "${PR_LABEL}" --head "${PR_BRANCH}" --json number | jq -r '.[0].number // ""') + PR_ID=$(gh pr list --label "${PR_LABEL}" --head "${PR_BRANCH}" --json number | jq -r '.[0].number // ""') if [ "$PR_ID" == "" ]; then PR_ID=$(gh pr create -l "$PR_LABEL" -t "$PR_TITLE" --body "") fi From f0c889d51f32906498da1c12e44bf5a03ccee223 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:51:11 +0530 Subject: [PATCH 3/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index d39c86a6bd..07f49a8cc4 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -30,6 +30,9 @@ jobs: -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/${{ github.repository }}/releases/latest | jq '.tag_name')" sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'"${latest_tag}"'|g' docker-compose.yml + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git checkout -b "${PR_BRANCH}" git fetch || true git push -u origin "${PR_BRANCH}" --force-with-lease From d0d2a449787f442dcb4f41e4542d5de2bcd5fb72 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:53:18 +0530 Subject: [PATCH 4/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index 07f49a8cc4..11da553c3f 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -21,6 +21,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: main - name: create-PR shell: bash run: | From 051731f54e4d26fcd4c3c21b0a975db910dba6db Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:55:34 +0530 Subject: [PATCH 5/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index 11da553c3f..65b8aa6850 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -34,9 +34,10 @@ jobs: sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'"${latest_tag}"'|g' docker-compose.yml git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git checkout -b "${PR_BRANCH}" git fetch || true + git add -u + git commit -m 'chore(automated): upgrade docker-compose.yml stable tags' git push -u origin "${PR_BRANCH}" --force-with-lease PR_ID=$(gh pr list --label "${PR_LABEL}" --head "${PR_BRANCH}" --json number | jq -r '.[0].number // ""') @@ -44,7 +45,7 @@ jobs: PR_ID=$(gh pr create -l "$PR_LABEL" -t "$PR_TITLE" --body "") fi - git commit -m 'chore(automated): upgrade docker-compose.yml stable tags' + gh pr merge --auto --squash env: GH_TOKEN: ${{ github.token }} From eae6f6fbbc3479d5dbdd320855bffaf0d3d76032 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:56:37 +0530 Subject: [PATCH 6/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index 65b8aa6850..19890f0ef0 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -31,7 +31,7 @@ jobs: -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/${{ github.repository }}/releases/latest | jq '.tag_name')" - sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'"${latest_tag}"'|g' docker-compose.yml + sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'${latest_tag}'|g' docker-compose.yml git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" git checkout -b "${PR_BRANCH}" From 21c86f67a7696aa8ed5cd8af27e74b1466959ec7 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:57:40 +0530 Subject: [PATCH 7/7] Update update-docker-compose-stable.yaml --- .github/workflows/update-docker-compose-stable.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docker-compose-stable.yaml b/.github/workflows/update-docker-compose-stable.yaml index 19890f0ef0..437d83ea49 100644 --- a/.github/workflows/update-docker-compose-stable.yaml +++ b/.github/workflows/update-docker-compose-stable.yaml @@ -30,8 +30,8 @@ jobs: latest_tag="$(gh api \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - /repos/${{ github.repository }}/releases/latest | jq '.tag_name')" - sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'${latest_tag}'|g' docker-compose.yml + /repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')" + sed -i -E 's|(image: ghcr\.io/peerdb\-io/.*?:stable-)(.*$)|\1'"${latest_tag}"'|g' docker-compose.yml git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" git checkout -b "${PR_BRANCH}"