Skip to content

Commit

Permalink
Fix GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
mbologna committed Nov 28, 2024
1 parent 1e8f0db commit 89198fb
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/build-scan-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,30 @@ jobs:
with:
dockerfile: Dockerfile

- name: Lint Shell Script with ShellCheck
- name: Lint Shell Scripts with ShellCheck
uses: ludeeus/action-shellcheck@master

- name: Lint Kubernetes resources with KubeLinter
- name: Lint Kubernetes Resources with KubeLinter
id: kube-lint-scan
uses: stackrox/kube-linter-action@v1
with:
directory: k8s
config: .kube-linter/config.yaml

# Set up Docker Buildx for multi-architecture builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
# Cache Docker layers for faster builds
- name: Cache Docker Layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-latest
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker image
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -53,8 +55,9 @@ jobs:
ghcr.io/${{ github.repository_owner }}/docker-bitlbee:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true

- name: Scan Docker image for vulnerabilities with Trivy
- name: Scan Docker Image for Vulnerabilities with Trivy
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ secrets.DOCKER_USERNAME }}/docker-bitlbee:latest
Expand All @@ -68,8 +71,3 @@ jobs:
with:
name: trivy-scan-results
path: trivy-results.json

- name: Push Docker image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/docker-bitlbee:latest
docker push ghcr.io/${{ github.repository_owner }}/docker-bitlbee:latest

0 comments on commit 89198fb

Please sign in to comment.