Skip to content

Commit

Permalink
Fix: GHA and push
Browse files Browse the repository at this point in the history
  • Loading branch information
mbologna committed Nov 28, 2024
1 parent c5e98fa commit 18d922c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-scan-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Checkout code
Expand Down Expand Up @@ -45,11 +48,20 @@ jobs:
${{ runner.os }}-buildx-
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log into registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
Expand All @@ -61,7 +73,7 @@ jobs:
ghcr.io/${{ github.repository_owner }}/docker-bitlbee:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
push: ${{ github.event_name != 'pull_request' }}

- name: Scan Docker Image for Vulnerabilities with Trivy
uses: aquasecurity/trivy-action@master
Expand Down

0 comments on commit 18d922c

Please sign in to comment.