Skip to content

Commit 888678d

Browse files
committed
Update release action
1 parent b3512cd commit 888678d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ jobs:
66
buildDockerImage:
77
env:
88
EXPORTER_NAME: elasticsearch-exporter
9-
name: Build docker image
9+
strategy:
10+
matrix:
11+
docker: ['scratch','ubi']
12+
name: Build docker image ${{ matrix.docker }}
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@master
@@ -21,18 +24,16 @@ jobs:
2124
run: exit 78
2225
- name: Build image
2326
run: |
24-
docker build --label release=${{ github.event.release.tag_name }} -f Dockerfile --target scratch -t artifactory.internal.sysdig.com/$EXPORTER_NAME:latest .
25-
docker build --label release=${{ github.event.release.tag_name }} -f Dockerfile --target ubi -t artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-ubi .
27+
docker build --label release=${{ github.event.release.tag_name }} -f ./docker/Dockerfile --target ${{ matrix.docker }} -t artifactory.internal.sysdig.com/$EXPORTER_NAME:latest .
2628
- name: Publish docker image
2729
run: |
28-
docker tag artifactory.internal.sysdig.com/$EXPORTER_NAME:latest artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}
29-
docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}
30-
docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-ubi
30+
docker tag artifactory.internal.sysdig.com/$EXPORTER_NAME:latest artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-${{ matrix.docker }}
31+
docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-${{ matrix.docker }}
3132
docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:latest
3233
- name: Upload master to Quay.io
3334
uses: fjogeleit/http-request-action@master
3435
with:
35-
url: 'https://sysdig-jenkins.internal.sysdig.com/view/Integrations/job/integrations-elasticsearch-exporter/buildWithParameters?token=${{ secrets.JENKINS_PROMCAT_LAUNCH_TOKEN }}&EXPORTER=elasticsearch-exporter&DRY_RUN=false'
36+
url: 'https://sysdig-jenkins.internal.sysdig.com/view/Integrations/job/integrations-redis-exporter/buildWithParameters?token=${{ secrets.JENKINS_PROMCAT_LAUNCH_TOKEN }}&EXPORTER=redis-exporter&DRY_RUN=false'
3637
method: 'POST'
3738
3839
password: ${{ secrets.JENKINS_PROMCAT_API_TOKEN }}

0 commit comments

Comments
 (0)