Skip to content

update actions

update actions #17

Workflow file for this run

name: build dreamkast-weaver image when branches are pushed
on:
push:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pusher.name != 'dreamkast-cloudnativedays'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.login-ecr.outputs.registry }}/dreamkast-weaver
tags: |
type=sha,prefix=,format=long
type=ref,event=branch
- name: Build
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./
file: Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ steps.login-ecr.outputs.registry }}/dreamkast-weaver:${{ github.sha }}'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'