Skip to content

Commit

Permalink
Merge pull request #1374 from openmeterio/docker-cleanup
Browse files Browse the repository at this point in the history
Docker cleanup
  • Loading branch information
sagikazarmark authored Aug 15, 2024
2 parents 9793b8a + 6d4c503 commit 49b6f40
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions:
jobs:
container-image:
name: Container image
runs-on: ${{ github.actor == 'dependabot[bot]' && 'ubuntu-latest' || 'ubuntu-latest-large' }}
runs-on: ubuntu-latest

permissions:
contents: read
Expand Down Expand Up @@ -80,15 +80,14 @@ jobs:
uses: depot/build-push-action@e7743ee6585d261968c7ae0ef64977ee98c09d74 # v1.13.0
with:
context: .
target: ${{ matrix.target }}
build-args: |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
platforms: linux/amd64,linux/arm64 # The confluent library doesn't support ARMv7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ inputs.publish }}
save: true
project: mx1q1j4nzh
project: ${{ vars.DEPOT_PROJECT }}

- name: Set image ref
id: image-ref
Expand All @@ -97,14 +96,14 @@ jobs:
- name: Retrieve pull token
id: pull-token
run: |
PULL_TOKEN="$(depot pull-token --project mx1q1j4nzh)"
PULL_TOKEN="$(depot pull-token --project ${{ vars.DEPOT_PROJECT }})"
echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT"
echo "::add-mask::$PULL_TOKEN"
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
image-ref: registry.depot.dev/mx1q1j4nzh:${{ steps.build.outputs.build-id }}
image-ref: registry.depot.dev/${{ vars.DEPOT_PROJECT }}:${{ steps.build.outputs.build-id }}
format: sarif
output: trivy-results.sarif
env:
Expand All @@ -125,7 +124,7 @@ jobs:

benthos-collector-container-image:
name: Benthos Collector Container image
runs-on: ${{ github.actor == 'dependabot[bot]' && 'ubuntu-latest' || 'ubuntu-latest-large' }}
runs-on: ubuntu-latest

permissions:
contents: read
Expand Down Expand Up @@ -185,7 +184,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
push: ${{ inputs.publish }}
save: true
project: mx1q1j4nzh
project: ${{ vars.DEPOT_PROJECT }}

- name: Set image ref
id: image-ref
Expand All @@ -194,14 +193,14 @@ jobs:
- name: Retrieve pull token
id: pull-token
run: |
PULL_TOKEN="$(depot pull-token --project mx1q1j4nzh)"
PULL_TOKEN="$(depot pull-token --project ${{ vars.DEPOT_PROJECT }})"
echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT"
echo "::add-mask::$PULL_TOKEN"
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
image-ref: registry.depot.dev/mx1q1j4nzh:${{ steps.build.outputs.build-id }}
image-ref: registry.depot.dev/${{ vars.DEPOT_PROJECT }}:${{ steps.build.outputs.build-id }}
format: sarif
output: trivy-results.sarif
env:
Expand Down

0 comments on commit 49b6f40

Please sign in to comment.