From 510a5ead7324886eda9128108421aca65c92cb3c Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 9 Jan 2024 14:23:10 +1100 Subject: [PATCH] Create separate steps for GCP operator release --- .../publish-gcp-oidc-enclave-docker.yaml | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-gcp-oidc-enclave-docker.yaml b/.github/workflows/publish-gcp-oidc-enclave-docker.yaml index 253ccb420..041830e75 100644 --- a/.github/workflows/publish-gcp-oidc-enclave-docker.yaml +++ b/.github/workflows/publish-gcp-oidc-enclave-docker.yaml @@ -117,13 +117,51 @@ jobs: echo "jar_version=$(mvn help:evaluate -Dexpression=project.version | grep -e '^[1-9][^\[]')" >> $GITHUB_OUTPUT echo "git_commit=$(git show --format="%h" --no-patch)" >> $GITHUB_OUTPUT cp -r target ${{ env.DOCKER_CONTEXT_PATH }}/ - + + e2e: + name: Run E2E tests + runs-on: ubuntu-latest + permissions: + contents: write + security-events: write + packages: write + pull-requests: write + needs: buildImage + steps: + - name: Checkout full history on Main + uses: actions/checkout@v4 + if: ${{ inputs.version_number_input == ''}} + with: + # git-restore-mtime requires full git history. The default fetch-depth value (1) creates a shallow checkout. + fetch-depth: 0 + + - name: Checkout full history at tag v${{ inputs.version_number_input }} + uses: actions/checkout@v4 + if: ${{ inputs.version_number_input != ''}} + with: + ref: v${{ inputs.version_number_input }} + # git-restore-mtime requires full git history. The default fetch-depth value (1) creates a shallow checkout. + fetch-depth: 0 + + - name: Restore timestamps + uses: thetradedesk/git-restore-mtime-action@v1.2 + - name: E2E uses: ./.github/workflows/run-e2e-tests-on-operator.yaml with: operator_image_version: ${{ steps.updatePom.outputs.image_tag }} operator_branch: ${{ github.ref }} - + + release: + name: Create releases + runs-on: ubuntu-latest + permissions: + contents: write + security-events: write + packages: write + pull-requests: write + needs: e2e + steps: - name: Commit pom.xml and version.json if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE != 'true' }} uses: EndBug/add-and-commit@v9