diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 103c8f4f3..67eba7c06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,11 @@ name: Github-action-demo on: - push: - branches: [ master ] + pull_request: + branches: + - main + types: + - closed jobs: build: environment: @@ -14,11 +17,11 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & push the Docker image env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USER }} run: | export VERSION=$(cat service.yaml) export CF_IMAGE=$DOCKERHUB_USERNAME/${{ github.event.repository.name }}:$VERSION @@ -27,18 +30,19 @@ jobs: - name: Report image with: CF_IMAGE: ${{ env.CF_IMAGE }} - CF_HOST: "https://mr-5f04515c6f790a046303eb5a-d0a662e.cf-cd.com" + CF_HOST: "https://mr-62e11313baf09e2d31eafdb0-202e3f9.cf-cd.com" CF_API_KEY: ${{ secrets.CF_API_KEY }} - CF_CONTAINER_REGISTRY_INTEGRATION: "docker" + CF_CONTAINER_REGISTRY_INTEGRATION: "dockerhub" CF_JIRA_INTEGRATION: "jira" CF_GITHUB_TOKEN: ${{ secrets.PAT }} - CF_JIRA_MESSAGE: "${{ github.event.head_commit.message }}" + CF_JIRA_MESSAGE: "${{ github.event.pull_request.head.ref }}" + CF_GIT_BRANCH: "${{ github.event.pull_request.head.ref }}" CF_JIRA_PROJECT_PREFIX: "CR" uses: codefresh-io/codefresh-report-image@latest - name: Checkout csdp-salesdemo_applications uses: actions/checkout@v3 with: - repository: idan-codefresh/canary-rollout # change to real repo + repository: razielt77/canary-rollout # change to real repo path: . - name: Update application version run: | diff --git a/service.yaml b/service.yaml index 24560d9b8..08ec89e7f 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -blue +purple