Update actions/checkout action to v4 #53
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: Lint & Test | |
# Run for all pushes to main and pull requests when Go or YAML files change | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Run check | |
run: FC_OUT=/tmp/krakend.yml make check | |
build-image: | |
name: build-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Verify krakend configuration | |
run: FC_OUT=/tmp/krakend.yml make check | |
- name: docker-metadata | |
id: docker-metadata | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/${{ github.repository_owner }}/api-gateway | |
tags: | | |
type=sha | |
- name: Build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: false | |
load: true | |
tags: ${{ steps.docker-metadata.outputs.tags }} | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: ${{ steps.docker-metadata.outputs.tags }} | |
security-checks: 'vuln,config,secret' | |
ignore-unfixed: true | |
severity: 'HIGH,CRITICAL' | |
format: 'table' |