fix: don't use protected env var name -.- #5
Workflow file for this run
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 and Push Docker Humitifier-Server Image | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: humitifier-server | |
DOCKERFILE_PATH: ./humitifier-server/Dockerfile | |
CONTEXT_PATH: ./humitifier-server | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push main image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ env.CONTEXT_PATH }} | |
file: ${{ env.DOCKERFILE_PATH }} | |
push: true | |
tags: | | |
ghcr.io/centrefordigitalhumanities/humitifier/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
# ghcr.io/centrefordigitalhumanities/humitifier/${{ env.IMAGE_NAME }}:latest | |
- name: Grype Scan | |
id: scan | |
uses: anchore/scan-action@v3 | |
with: | |
image: ghcr.io/centrefordigitalhumanities/humitifier/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
fail-build: false | |
- name: upload Grype SARIF report | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} |