-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (59 loc) · 2.63 KB
/
docker-image.yml
File metadata and controls
61 lines (59 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
environment:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push the Docker image
env:
CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/report-image-github-action:202207211619
run: |
docker build . --file Dockerfile --tag $CF_IMAGE && docker push $CF_IMAGE
echo "Image should be accessible to your local machine (after docker login) by:"
echo "docker pull $CF_IMAGE"
docker pull $CF_IMAGE
echo "On the next step, the report image would use the integration to pull information on the reported image, and using the specified enrichers."
echo " HOST ${{ secrets.LOCAL_HOST }}"
CF_JIRA_MESSAGE="Example for inserting branch name: $(echo ${GITHUB_REF##*/}) like CR-11027-fix-report "
echo "CF_JIRA_MESSAGE=$CF_JIRA_MESSAGE" >> $GITHUB_ENV
- name: report image by action
env:
CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/report-image-github-action:202207211619
with:
# Specify cluster app-proxy
#CF_HOST: "${{ secrets.CF_HOST }}"
# CF_HOST: "${{ secrets.LOCAL_HOST }}"
# CF_HOST: "https://saffi-codefresh-platform.ngrok.io"
CF_HOST: "https://saffi.pipeline-team.cf-cd.com"
CF_API_KEY: ${{ secrets.CF_API_KEY }}
# use image registry integration - the name of the integration used for pulling information on the image.
CF_CONTAINER_REGISTRY_INTEGRATION: "docker"
# report image
CF_IMAGE: "${{ env.CF_IMAGE }}"
# integration with
# CF_ENRICHERS: "jira, git"
# use githug token
CF_GITHUB_TOKEN: ${{ secrets.CF_GITHUB_TOKEN }}
# use jira integration - jira is the name of the integration created in codefresh argo platform.
CF_JIRA_INTEGRATION: "jira"
CF_JIRA_MESSAGE: "${{ env.CF_JIRA_MESSAGE }}"
# "A message with embedded issue ( i.e. CR-11027 )
# that would be use query jira for the ticket"
# a specified prefix for finding the jira issue
CF_JIRA_PROJECT_PREFIX: "CR"
# uses: saffi-codefresh/codefresh-report-image@b0.0.3
# uses: codefresh-io/codefresh-report-image@0.0.152
uses: codefresh-io/codefresh-report-image@latest