Merge pull request #134 from mercedes-benz/brahmprakashMishra-patch-2 #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test/Deploy Develop | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
build: | |
name: Build Docker Image from Develop Branch | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout Develop Branch | |
uses: actions/checkout@v2 | |
- name: Removing Docs Folder | |
run: rm -rf docs | |
- name: Run Synopsys Detect | |
uses: synopsys-sig/[email protected] | |
env: | |
DETECT_PROJECT_NAME: "Neodash Open Source fork" | |
DETECT_PROJECT_VERSION_NAME: "develop" | |
with: | |
scan-mode: INTELLIGENT | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
detect-version: 9.2.0 | |
blackduck-url: https://bdscan.i.mercedes-benz.com | |
blackduck-api-token: ${{ secrets.BLACKDUCK_TOKEN }} | |
extraArgs: --detect.blackduck.signature.scanner.snippet.matching | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Populate Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
updatepath.azurecr.io/neodash-mbenz | |
tags: | | |
type=ref, event=branch | |
type=sha | |
- name: Azure Container Registry Login | |
uses: docker/login-action@v2 | |
with: | |
registry: updatepath.azurecr.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push to ACR | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: ./Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |