1
1
name : Pull Request
2
2
3
3
on :
4
- pull_request_target :
4
+ pull_request :
5
5
branches :
6
6
- master
7
7
@@ -46,27 +46,27 @@ jobs:
46
46
cd deployments/kubernetes/chart/forecastle
47
47
helm lint
48
48
49
- - name : Install kubectl
50
- run : |
51
- curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl"
52
- sudo install ./kubectl /usr/local/bin/ && rm kubectl
53
- kubectl version --short --client
54
- kubectl version --short --client | grep -q ${KUBERNETES_VERSION}
55
-
56
- - name : Install Kind
57
- run : |
58
- curl -L -o kind https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64
59
- sudo install ./kind /usr/local/bin && rm kind
60
- kind version
61
- kind version | grep -q ${KIND_VERSION}
62
-
63
- - name : Create Kind Cluster
64
- run : |
65
- kind create cluster
66
- kubectl cluster-info
49
+ # - name: Install kubectl
50
+ # run: |
51
+ # curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl"
52
+ # sudo install ./kubectl /usr/local/bin/ && rm kubectl
53
+ # kubectl version --short --client
54
+ # kubectl version --short --client | grep -q ${KUBERNETES_VERSION}
55
+
56
+ # - name: Install Kind
57
+ # run: |
58
+ # curl -L -o kind https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64
59
+ # sudo install ./kind /usr/local/bin && rm kind
60
+ # kind version
61
+ # kind version | grep -q ${KIND_VERSION}
62
+
63
+ # - name: Create Kind Cluster
64
+ # run: |
65
+ # kind create cluster
66
+ # kubectl cluster-info
67
67
68
- - name : Test
69
- run : make test
68
+ # - name: Test
69
+ # run: make test
70
70
71
71
- name : Generate Tag
72
72
id : generate_tag
@@ -81,24 +81,19 @@ jobs:
81
81
- name : Set up Docker Buildx
82
82
uses : docker/setup-buildx-action@v3
83
83
84
- - name : Login to ghcr registry
85
- uses : docker/login-action@v3
86
- with :
87
- registry : ${{env.REGISTRY}}
88
- username : stakater-user
89
- password : ${{secrets.GITHUB_TOKEN}}
90
-
91
84
- name : Generate image repository path for ghcr registry
92
85
run : |
93
86
echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
94
87
95
- - name : Build and Push image to ghcr registry
88
+ # To identify any broken changes in dockerfiles or dependencies
89
+
90
+ - name : Build image
96
91
uses : docker/build-push-action@v5
97
92
with :
98
93
context : .
99
94
file : ${{ env.DOCKER_FILE_PATH }}
100
95
pull : true
101
- push : true
96
+ push : false
102
97
cache-to : type=inline
103
98
build-args : BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
104
99
platforms : linux/amd64,linux/arm,linux/arm64
@@ -109,56 +104,29 @@ jobs:
109
104
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
110
105
org.opencontainers.image.revision=${{ github.sha }}
111
106
112
- - name : Login to Registry for DockerHub
113
- uses : docker/login-action@v3
114
- with :
115
- username : ${{ secrets.STAKATER_DOCKERHUB_USERNAME }}
116
- password : ${{ secrets.STAKATER_DOCKERHUB_PASSWORD }}
117
-
118
- - name : Generate image repository path for DockerHub registry
119
- run : |
120
- echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
121
-
122
- - name : Build and Push Docker Image to DockerHub registry
123
- uses : docker/build-push-action@v5
124
- with :
125
- context : .
126
- file : ${{ env.DOCKER_FILE_PATH }}
127
- pull : true
128
- push : true
129
- build-args : BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
130
- cache-to : type=inline
131
- platforms : linux/amd64,linux/arm,linux/arm64
132
- tags : |
133
- ${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
134
- labels : |
135
- org.opencontainers.image.source=${{ github.event.repository.clone_url }}
136
- org.opencontainers.image.created=${{ steps.prep.outputs.created }}
137
- org.opencontainers.image.revision=${{ github.sha }}
138
-
139
- - name : Comment on PR
140
- uses : mshick/add-pr-comment@v2
141
- env :
142
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
143
- with :
144
- message : ' @${{ github.actor }} Image is available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
145
- allow-repeats : true
146
-
147
- - name : Notify Failure
148
- if : failure()
149
- uses : mshick/add-pr-comment@v2
150
- env :
151
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
152
- with :
153
- message : ' @${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
154
- allow-repeats : true
155
-
156
- - name : Notify Slack
157
- uses : 8398a7/action-slack@v3
158
- if : always() # Pick up events even if the job fails or is canceled.
159
- with :
160
- status : ${{ job.status }}
161
- fields : repo,author,action,eventName,ref,workflow
162
- env :
163
- GITHUB_TOKEN : ${{ secrets.STAKATER_GITHUB_TOKEN }}
164
- SLACK_WEBHOOK_URL : ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
107
+ # - name: Comment on PR
108
+ # uses: mshick/add-pr-comment@v2
109
+ # env:
110
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
+ # with:
112
+ # message: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
113
+ # allow-repeats: true
114
+
115
+ # - name: Notify Failure
116
+ # if: failure()
117
+ # uses: mshick/add-pr-comment@v2
118
+ # env:
119
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120
+ # with:
121
+ # message: '@${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
122
+ # allow-repeats: true
123
+
124
+ # - name: Notify Slack
125
+ # uses: 8398a7/action-slack@v3
126
+ # if: always() # Pick up events even if the job fails or is canceled.
127
+ # with:
128
+ # status: ${{ job.status }}
129
+ # fields: repo,author,action,eventName,ref,workflow
130
+ # env:
131
+ # GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
132
+ # SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
0 commit comments