rename Containerfile -> Containerfile.multistage, update README.md #13
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: Build demoapp-backend | |
# Events: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
on: | |
push: | |
branches: | |
- main | |
- release/.* | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint.yml # Workflow calls need to be executed as jobs | |
with: | |
yaml: true | |
sonarqube-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: SonarQube Scan | |
uses: sonarsource/sonarqube-scan-action@master | |
with: | |
# github context: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | |
args: > | |
-Dsonar.organization=${{ github.repository_owner }} | |
-Dsonar.projectKey=demoapp-backend | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: https://sonarcloud.io/ | |
build: | |
needs: sonarqube-scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 # https://github.com/marketplace/actions/docker-setup-qemu | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 # https://github.com/marketplace/actions/docker-setup-buildx | |
- name: Build container image | |
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images | |
with: | |
context: . | |
file: Containerfile | |
push: false | |
tags: demoapp-backend | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |