From 898a7f93809dd11d0bf015eef14655371735eaaf Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:26:24 -0600 Subject: [PATCH 01/20] start --- .github/workflows/optimize-images.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 69e79cdc06f..3a9f4632285 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -1,7 +1,5 @@ - # Image optimization before release build. This workflow commit only images that have been optimized - name: '[Build] Optimize Image' on: From 99aeae6f79d4e2793e275351236a79153fc345e3 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:40:48 -0600 Subject: [PATCH 02/20] image test --- .github/workflows/optimize-images.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 3a9f4632285..2ec81ab681e 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - 'release/v[0-9]+.[0-9]+.[0-9]+' + - chanel-9687-automation-update-optimization-workflow-to-automatically-push-chages-through-pr jobs: optimize_images: @@ -32,13 +32,23 @@ jobs: run: | git config --global user.name 'github-actions' git config --global user.email 'github-actions@users.noreply.github.com' + git checkout -b optimize-images-$(date +'%Y%m%d%H%M%S') git add VAMobile/ios/fastlane/screenshots/en-US git add VAMobile/android/fastlane/metadata/android/en-US/images if git diff --cached --quiet; then echo "No changes to commit." else git commit -m "Optimize images before release build" - git push + git push --set-upstream origin HEAD fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create a Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Optimize images before release build" + branch: optimize-images-$(date +'%Y%m%d%H%M%S') + title: "Optimize images before release build" + body: | + This PR optimizes images in preparation for the release build. \ No newline at end of file From 7c5efbcea819aaeae48b619453dccc36ab27b953 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:51:33 -0600 Subject: [PATCH 03/20] fix branch name --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 2ec81ab681e..456232263f6 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - chanel-9687-automation-update-optimization-workflow-to-automatically-push-chages-through-pr + - chanel-9687-automation-update-optimization-workflow-to-automatically-push-changes-through-pr jobs: optimize_images: From a5682e9369258f86d72db98e57c2d77133107152 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:20:39 -0600 Subject: [PATCH 04/20] access branch in last step --- .github/workflows/optimize-images.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 456232263f6..26d17a2788f 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -11,9 +11,12 @@ jobs: optimize_images: name: Optimize Images runs-on: ubuntu-latest + env: + BRANCH_NAME: optimize-images-${{ github.run_id }} # Declare environment variable here steps: - name: Checkout code uses: actions/checkout@v2 + - name: Install imagemin-cli run: npm install -g imagemin-cli - name: Optimize iOS images @@ -28,11 +31,13 @@ jobs: cd ../sevenInchScreenshots/ imagemin * --out-dir=. + - name: Commit optimized images run: | + git config --global user.name 'github-actions' git config --global user.email 'github-actions@users.noreply.github.com' - git checkout -b optimize-images-$(date +'%Y%m%d%H%M%S') + git checkout -b ${{ env.BRANCH_NAME }} git add VAMobile/ios/fastlane/screenshots/en-US git add VAMobile/android/fastlane/metadata/android/en-US/images if git diff --cached --quiet; then @@ -47,8 +52,7 @@ jobs: uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Optimize images before release build" - branch: optimize-images-$(date +'%Y%m%d%H%M%S') + branch: ${{ env.BRANCH_NAME }} title: "Optimize images before release build" body: | This PR optimizes images in preparation for the release build. \ No newline at end of file From 8ffc8c1ee406fa6b2e18de6e540df4ef794f65d5 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:17:19 -0600 Subject: [PATCH 05/20] specify base branch --- .github/workflows/optimize-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 26d17a2788f..528b261c237 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -53,6 +53,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ env.BRANCH_NAME }} + base: ${{ github.ref_name }} title: "Optimize images before release build" body: | This PR optimizes images in preparation for the release build. \ No newline at end of file From b37592b09bf22519817993de02659aa2e86387f6 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:29:45 -0600 Subject: [PATCH 06/20] get PR link and slack notify --- .github/workflows/optimize-images.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 528b261c237..0caf75d7c1a 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -49,6 +49,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create a Pull Request + id: create_pr uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -56,4 +57,16 @@ jobs: base: ${{ github.ref_name }} title: "Optimize images before release build" body: | - This PR optimizes images in preparation for the release build. \ No newline at end of file + This PR optimizes images in preparation for the release build. + # Check if a PR was created + - name: Pull Request Details + run: | + echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" + - name: Post message to Slack + id: post_message + run: | + ts=$(curl -X POST -H 'Authorization: Bearer '"$SLACK_API_TOKEN"' ' \ + -H 'Content-type: application/json' \ + --data '{"channel":"va-mobile-app-automation-test-channel","text":"Pull request created: ${{ steps.create_pr.outputs.pull-request-url }}. See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results."}' \ + https://slack.com/api/chat.postMessage| + jq -r '.ts') \ No newline at end of file From 3eb4fe5be1d2ce237e604e11526fa860142fc6dc Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:03:57 -0600 Subject: [PATCH 07/20] debug git info --- .github/workflows/optimize-images.yml | 34 ++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 0caf75d7c1a..4cd81bef772 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -11,6 +11,8 @@ jobs: optimize_images: name: Optimize Images runs-on: ubuntu-latest + outputs: + pr_url: ${{ steps.create_pr.outputs.pull-request-url }} # Declare the output for PR URL env: BRANCH_NAME: optimize-images-${{ github.run_id }} # Declare environment variable here steps: @@ -48,13 +50,19 @@ jobs: fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Debug Git Information + run: | + echo "Current Branch: $(git branch --show-current)" + echo "GitHub Ref: ${{ github.ref }}" + echo "GitHub Run ID: ${{ github.run_id }}" + git remote -v - name: Create a Pull Request id: create_pr uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ env.BRANCH_NAME }} - base: ${{ github.ref_name }} + base: develop title: "Optimize images before release build" body: | This PR optimizes images in preparation for the release build. @@ -62,11 +70,21 @@ jobs: - name: Pull Request Details run: | echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" - - name: Post message to Slack - id: post_message + + start_slack_thread: + name: Start Slack thread + runs-on: ubuntu-latest + if: ${{ success() }} + needs: optimize_images + steps: + - name: Notify Slack + env: + SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }} + channel_name: va-mobile-app-automation-test-channel + message: 'Pull request created to review optimzed images before release build: ${{ needs.optimize_images.outputs.pr_url }}. See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results.' run: | - ts=$(curl -X POST -H 'Authorization: Bearer '"$SLACK_API_TOKEN"' ' \ - -H 'Content-type: application/json' \ - --data '{"channel":"va-mobile-app-automation-test-channel","text":"Pull request created: ${{ steps.create_pr.outputs.pull-request-url }}. See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results."}' \ - https://slack.com/api/chat.postMessage| - jq -r '.ts') \ No newline at end of file + curl -X POST \ + -H "Authorization: Bearer $SLACK_API_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"channel\":\"$channel_name\",\"text\":\"$message\"}" \ + https://slack.com/api/chat.postMessage \ No newline at end of file From 420f642b2c1b7fa8f6384fc3768124c0b17c4c3b Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:37:58 -0600 Subject: [PATCH 08/20] change base branch --- .github/workflows/optimize-images.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 4cd81bef772..b540c1470ca 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - chanel-9687-automation-update-optimization-workflow-to-automatically-push-changes-through-pr + - chanel-test-pr-9697-test1 jobs: optimize_images: @@ -62,29 +62,11 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ env.BRANCH_NAME }} - base: develop + base: ${{ github.ref_name }} title: "Optimize images before release build" body: | This PR optimizes images in preparation for the release build. # Check if a PR was created - name: Pull Request Details run: | - echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" - - start_slack_thread: - name: Start Slack thread - runs-on: ubuntu-latest - if: ${{ success() }} - needs: optimize_images - steps: - - name: Notify Slack - env: - SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }} - channel_name: va-mobile-app-automation-test-channel - message: 'Pull request created to review optimzed images before release build: ${{ needs.optimize_images.outputs.pr_url }}. See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results.' - run: | - curl -X POST \ - -H "Authorization: Bearer $SLACK_API_TOKEN" \ - -H "Content-Type: application/json" \ - -d "{\"channel\":\"$channel_name\",\"text\":\"$message\"}" \ - https://slack.com/api/chat.postMessage \ No newline at end of file + echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" \ No newline at end of file From 92088f618efc330c39ea6d05e43974e8b3439fde Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:14:05 -0600 Subject: [PATCH 09/20] test2 --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index b540c1470ca..59936d12b0e 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - chanel-test-pr-9697-test1 + - chanel-test-pr-9687-test1 jobs: optimize_images: From afd7fa248acc3fc146d295f64516d286526fbbe7 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:28:41 -0600 Subject: [PATCH 10/20] test test2 --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 59936d12b0e..e2ba6a5c996 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - chanel-test-pr-9687-test1 + - chanel-test-pr-9687-test2 jobs: optimize_images: From ac27092efedd0c41cf72ad32b7268bc057a816b8 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:59:50 -0600 Subject: [PATCH 11/20] use pr template --- .github/workflows/optimize-images.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index e2ba6a5c996..e51e07c8d71 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -64,8 +64,7 @@ jobs: branch: ${{ env.BRANCH_NAME }} base: ${{ github.ref_name }} title: "Optimize images before release build" - body: | - This PR optimizes images in preparation for the release build. + body-path: .github/PULL_REQUEST_TEMPLATE/pr-template.md # Check if a PR was created - name: Pull Request Details run: | From cf0e64ef6d21ba9f13964e810f6e48e83dddf40d Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:11:22 -0600 Subject: [PATCH 12/20] test own branch --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index e51e07c8d71..5ff52bf9b53 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -5,7 +5,7 @@ name: '[Build] Optimize Image' on: push: branches: - - chanel-test-pr-9687-test2 + - chanel-9687-automation-update-optimization-workflow-to-automatically-push-changes-through-pr jobs: optimize_images: From 46397e99e59e7d803efe175b142a476ba85faad0 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:14:44 -0600 Subject: [PATCH 13/20] correct md pr --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 5ff52bf9b53..3f9a794fc60 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -64,7 +64,7 @@ jobs: branch: ${{ env.BRANCH_NAME }} base: ${{ github.ref_name }} title: "Optimize images before release build" - body-path: .github/PULL_REQUEST_TEMPLATE/pr-template.md + body-path: .github/PULL_REQUEST_TEMPLATE/pull_request_template.md # Check if a PR was created - name: Pull Request Details run: | From 34e5eb2435087617e507a00a8596d451fa44942e Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:18:51 -0600 Subject: [PATCH 14/20] correct path --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 3f9a794fc60..3f2f9b114b2 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -64,7 +64,7 @@ jobs: branch: ${{ env.BRANCH_NAME }} base: ${{ github.ref_name }} title: "Optimize images before release build" - body-path: .github/PULL_REQUEST_TEMPLATE/pull_request_template.md + body-path: .github/pull_request_template.md # Check if a PR was created - name: Pull Request Details run: | From a90143458979c3dc95c17f61920af275314bd4db Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:30:09 -0600 Subject: [PATCH 15/20] debug pr url --- .github/workflows/optimize-images.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 3f2f9b114b2..79c14f1cf61 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -50,22 +50,32 @@ jobs: fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Debug Staged Changes + run: | + git status + git diff --cached - name: Debug Git Information run: | echo "Current Branch: $(git branch --show-current)" echo "GitHub Ref: ${{ github.ref }}" echo "GitHub Run ID: ${{ github.run_id }}" git remote -v + git log --oneline -n 5 - name: Create a Pull Request id: create_pr uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ env.BRANCH_NAME }} + token: ${{ secrets.GH_ACTIONS_PAT}} base: ${{ github.ref_name }} + labels: devops + branch: ${{ env.BRANCH_NAME }} title: "Optimize images before release build" body-path: .github/pull_request_template.md + - name: Debug PR Creation + run: | + echo "Branch: ${{ env.BRANCH_NAME }}" + echo "Base: ${{ github.ref_name }}" # Check if a PR was created - name: Pull Request Details run: | - echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" \ No newline at end of file + echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" From 487a8d2a23f095045189436458827b919728726a Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:34:31 -0600 Subject: [PATCH 16/20] debug pr1 --- .github/workflows/optimize-images.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 79c14f1cf61..738ff456c86 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -79,3 +79,9 @@ jobs: - name: Pull Request Details run: | echo "Pull request URL: ${{ steps.create_pr.outputs.pull-request-url }}" + - name: Capture Pull Request URL + run: | + PR_URL=$(gh pr view --json url -q ".url") + echo "Pull request URL: $PR_URL" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b1bf410b1dcf2eca31a37b530bfea7e09128183f Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:00:41 -0600 Subject: [PATCH 17/20] use different env --- .github/workflows/optimize-images.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 738ff456c86..03ee5e974f4 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -27,7 +27,7 @@ jobs: run: | cd VAMobile/android/fastlane/metadata/android/en-US/images/ imagemin * --out-dir=. - + cd phoneScreenshots/ imagemin * --out-dir=. @@ -65,7 +65,7 @@ jobs: id: create_pr uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.GH_ACTIONS_PAT}} + token: ${{ secrets.GH_ACTIONS_PAT }} base: ${{ github.ref_name }} labels: devops branch: ${{ env.BRANCH_NAME }} @@ -84,4 +84,4 @@ jobs: PR_URL=$(gh pr view --json url -q ".url") echo "Pull request URL: $PR_URL" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ac6b065f57112e33e0395296cf42727ac6faa55e Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 3 Dec 2024 23:11:13 -0600 Subject: [PATCH 18/20] write permission --- .github/workflows/optimize-images.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 03ee5e974f4..39af1d26a1c 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -11,6 +11,8 @@ jobs: optimize_images: name: Optimize Images runs-on: ubuntu-latest + permissions: + pull-requests: write outputs: pr_url: ${{ steps.create_pr.outputs.pull-request-url }} # Declare the output for PR URL env: @@ -65,7 +67,7 @@ jobs: id: create_pr uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.GH_ACTIONS_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} base: ${{ github.ref_name }} labels: devops branch: ${{ env.BRANCH_NAME }} From 2575e1febc4e777c57df087fc5cfbebc40ebc4e8 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Tue, 3 Dec 2024 23:40:08 -0600 Subject: [PATCH 19/20] content permissions --- .github/workflows/optimize-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 39af1d26a1c..79c655c14a2 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write + contents: write outputs: pr_url: ${{ steps.create_pr.outputs.pull-request-url }} # Declare the output for PR URL env: From a1f92818b1fb2d361df71a14a29308e9a4cbc533 Mon Sep 17 00:00:00 2001 From: IsraelleHub <145595240+IsraelleHub@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:52:30 -0600 Subject: [PATCH 20/20] test file --- .github/testtext.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/testtext.txt diff --git a/.github/testtext.txt b/.github/testtext.txt new file mode 100644 index 00000000000..30d74d25844 --- /dev/null +++ b/.github/testtext.txt @@ -0,0 +1 @@ +test \ No newline at end of file