diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 994e19b..9f97297 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,12 @@ name: Docker Image CI +# on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ main ] on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + pull_request jobs: build: environment: @@ -16,33 +18,49 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: 'quay.io' + username: ${{ secrets.DOCKERQUAY_USERNAME }} + password: ${{ secrets.DOCKERQUAY_TOKEN }} - name: Build & push the Docker image env: - CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/csdp-report-image-github-action:example-reported-image + CF_IMAGE: 'quay.io/${{ secrets.DOCKERQUAY_USERNAME }}/denis:10.0.0' run: | docker build . --file Dockerfile --tag $CF_IMAGE && docker push $CF_IMAGE - - name: report image by action + + + - name: report image with: - CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/csdp-report-image-github-action:example-reported-image - CF_ENRICHERS: "jira, git" - # Specify cluster app-proxy - CF_HOST: "https://saffi.pipeline-team.cf-cd.com" - CF_VERBOSE: "1" + # Name of runtime to implement the enrichment +# CF_HOST: 'https://mr-60c7443e37ca2730b9757992-e4c9118.cf-cd.com' + + CF_RUNTIME_NAME: 'codefresh-hosted' + # Codefresh API key !! Committing a plain text token is a security risk. We highly recommend using an encrypted secrets. !! + # Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets + CF_API_KEY: ${{ secrets.CF_API_KEY }} - CF_DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - CF_DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} - "CF_GITHUB_TOKEN": ${{ secrets.G_TOKEN }} - "CF_GIT_PROVIDER": "github" - "CF_GIT_REPO": "codefresh-io/example-github-action-use-csdp-report-image" - "CF_GIT_BRANCH": "feature" - - "CF_JIRA_API_TOKEN": ${{ secrets.JIRA_TOKEN }} - "CF_JIRA_HOST_URL": "https://codefresh-io.atlassian.net" - "CF_JIRA_EMAIL": "saffi.hartal@codefresh.io" - "CF_JIRA_MESSAGE": "wip CR-11027" - "CF_JIRA_PROJECT_PREFIX": "CR" - uses: codefresh-io/csdp-report-image@0.0.40 + # Name of Container registry integration + CF_CONTAINER_REGISTRY_INTEGRATION: 'hosted-quay-new' + + # Name of Jira integration + CF_JIRA_INTEGRATION: 'eti-jira-new' + + # Image path to enrich + CF_IMAGE: 'quay.io/${{ secrets.DOCKERQUAY_USERNAME }}/denis:10.0.0' + + # GitHub Access token !! Committing a plain text token is a security risk. We highly recommend using an encrypted secrets. !! + # Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets + CF_GITHUB_TOKEN: ${{ secrets.G_TOKEN }} + + # Jira project filter + CF_JIRA_PROJECT_PREFIX: "CR" + + # String starting with the issue ID to associate with image + CF_JIRA_MESSAGE: "CR-11028" + +# CF_WORKFLOW_NAME: "test" + +# uses: codefresh-io/codefresh-report-image@latest + uses: eti-codefresh/codefresh-report-image@test8 + diff --git a/Dockerfile b/Dockerfile index 011dfc4..9fc8699 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,2 @@ FROM alpine -CMD ["echo", "your build image! integrate"] - +CMD ["echo", "your build imag e! integrate "]