chore: fix filename #29
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
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 |