-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (38 loc) · 1.3 KB
/
cx-github-action-publish.yml
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
name: Deploy Docker Images
env:
DOCKER_GITHUB: docker.pkg.github.com
PKG_NAME: checkmarx-github-action
TAG: latest
on:
push:
branches:
- master
jobs:
linux-latest:
name: Deploy Linux Docker Image - Latest
runs-on: ubuntu-latest
env:
OS: linux
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Build Docker Image
run: |
docker-compose build $PKG_NAME-$OS
docker tag $PKG_NAME-$OS:$TAG $DOCKER_GITHUB/$GITHUB_REPOSITORY/$PKG_NAME-$OS:$TAG
docker login $DOCKER_GITHUB -u $GITHUB_ACTOR -p ${{secrets.GITHUB_TOKEN}}
docker push $DOCKER_GITHUB/$GITHUB_REPOSITORY/$PKG_NAME-$OS:$TAG
# windows-latest:
# name: Deploy Windows Docker Image - Latest
# runs-on: windows-latest
# env:
# OS: windows
# steps:
# - name: Checkout
# uses: actions/checkout@v2.4.0
# - name: Build Docker Image
# run: |
# docker-compose build ${env:PKG_NAME}-${env:OS}
# docker tag ${env:PKG_NAME}-${env:OS}:${env:TAG} ${env:DOCKER_GITHUB}/${env:GITHUB_REPOSITORY}/${env:PKG_NAME}-${env:OS}:${env:TAG}
# docker login ${env:DOCKER_GITHUB} -u ${env:GITHUB_ACTOR} -p ${{secrets.GITHUB_TOKEN}}
# docker push ${env:DOCKER_GITHUB}/${env:GITHUB_REPOSITORY}/${env:PKG_NAME}-${env:OS}:${env:TAG}