From 67b2c5d1e3fe200fd1cee8e50dc46b0b14eff71f Mon Sep 17 00:00:00 2001 From: Phil Payne Date: Wed, 18 Oct 2023 11:05:30 +0100 Subject: [PATCH] Raise PR --- .github/workflows/on-tag.yml | 10 +++--- .github/workflows/pr-merge-main.yml | 2 +- .github/workflows/push-branch-test.yml | 49 -------------------------- .github/workflows/push-branch.yml | 3 +- 4 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/push-branch-test.yml diff --git a/.github/workflows/on-tag.yml b/.github/workflows/on-tag.yml index 6b92c0e..7ec6d00 100644 --- a/.github/workflows/on-tag.yml +++ b/.github/workflows/on-tag.yml @@ -5,7 +5,7 @@ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -name: CI caab-data-api +name: CI caab-data-api tag and deploy on: push: @@ -127,7 +127,6 @@ jobs: uses: actions/checkout@v3 with: repository: ministryofjustice/laa-ccms-caab-helm-charts - # TODO rename to develop ref: test path: laa-ccms-caab-helm-charts token: ${{ secrets.REPO_TOKEN }} @@ -146,7 +145,7 @@ jobs: git push origin update-laa-ccms-caab-ui: - needs: [ build-test-publish, ecr, define-image-tag ] + needs: [ build-test-publish, define-image-tag ] runs-on: ubuntu-latest environment: development steps: @@ -177,4 +176,7 @@ jobs: git config --global user.name "GitHub Actions Bot" git add build.gradle git commit -m "Update data-api version to ${APP_VERSION}" - git push origin dependency/update-data-api-version--${APP_VERSION} + git push origin dependency/update-data-api-version-${APP_VERSION} + + gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" + gh pr create --base main --head dependency/update-data-api-version-${APP_VERSION} --title "Update data-api version to ${APP_VERSION}" --body "Automatic PR raised by GitHub Actions to update data-api version to ${APP_VERSION}" diff --git a/.github/workflows/pr-merge-main.yml b/.github/workflows/pr-merge-main.yml index 6721507..6c051da 100644 --- a/.github/workflows/pr-merge-main.yml +++ b/.github/workflows/pr-merge-main.yml @@ -5,7 +5,7 @@ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -name: CI caab-data-api +name: CI caab-data-api pr to main on: pull_request: diff --git a/.github/workflows/push-branch-test.yml b/.github/workflows/push-branch-test.yml deleted file mode 100644 index e3c75b9..0000000 --- a/.github/workflows/push-branch-test.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle - -name: CI caab-data-api - -on: - push: - branches: - - task/ccls-1880_amend_package_versions - -permissions: - contents: read - packages: write - -jobs: - update-laa-ccms-caab-ui: - runs-on: ubuntu-latest - environment: development - steps: - - name: Checkout caab-ui repo - uses: actions/checkout@v3 - with: - repository: ministryofjustice/laa-ccms-caab - ref: main - token: ${{ secrets.REPO_TOKEN }} - - - name: Create a new branch - run: | - git checkout -b dependency/update-data-api-version-TEST - - - name: Update gradle build file - run: | - sed -i "s/uk.gov.laa.ccms.data:data-api:[^']*/uk.gov.laa.ccms.data:data-api:TEST/g" build.gradle - - - name: Commit and push changes - run: | - git config --global user.email "github@justice.gov.uk" - git config --global user.name "GitHub Actions Bot" - git add build.gradle - git commit -m "Update data-api version to TEST" - git push origin dependency/update-data-api-version-TEST - - gh auth login --with-token <<< "${{ secrets.REPO_TOKEN }}" - gh pr create --base main --head dependency/update-data-api-version-TEST --title "Update data-api version to TEST" --body "Automatic PR raised by GitHub Actions to update data-api version to TEST" - diff --git a/.github/workflows/push-branch.yml b/.github/workflows/push-branch.yml index dbe3661..e74440e 100644 --- a/.github/workflows/push-branch.yml +++ b/.github/workflows/push-branch.yml @@ -5,13 +5,12 @@ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -name: CI caab-data-api +name: CI caab-data-api push to branch on: push: branches-ignore: - main - - task/ccls-1880_amend_package_versions permissions: contents: read