Skip to content

chore: fix filename #29

chore: fix filename

chore: fix filename #29

on:
push:
branches:
- main
name: Build and Push
jobs:
publish_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Container
run: |
docker build --tag ghcr.io/${{ github.repository_owner }}/translate-bot:latest .
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ghcr.io/${{ github.repository_owner }}/translate-bot:latest'
scan-type: 'image'
format: 'table'
exit-code: '0' # 0 is passes, 1 is failed when scanning result is true.
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Push image to ghcr
run: |
docker push ghcr.io/${{ github.repository_owner }}/translate-bot:latest