Skip to content

Commit e8f4e3f

Browse files
committed
push image to ghcr.io
1 parent d969de7 commit e8f4e3f

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

.github/build-image.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Create and publish image
2+
on:
3+
push:
4+
branches: ['main']
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: ${{ github.repository }}
9+
10+
jobs:
11+
build-and-push-image:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
attestations: write
17+
id-token: write
18+
19+
steps:
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Build and push Docker image
27+
id: push
28+
uses: docker/build-push-action@v6
29+
with:
30+
context: "{{defaultContext:images}}"
31+
file: slingshot-scanner
32+
push: true
33+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

images/slingshot-scanner

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
FROM anchore/grype:v0.65.2 as grype
2-
FROM anchore/syft:v0.87.1 as syft
3-
FROM harbor-repo.vmware.com/dockerhub-proxy-cache/paketobuildpacks/builder-jammy-buildpackless-tiny:0.0.85
1+
FROM anchore/grype:v0.73.5 AS grype
2+
FROM anchore/syft:v0.99.0 AS syft
3+
FROM paketobuildpacks/builder-jammy-buildpackless-tiny:latest
44

55
USER root
66
RUN apt-get update && apt-get -y --no-install-recommends install \
77
bash \
88
curl \
99
vim \
10+
unzip \
11+
zip \
12+
file \
13+
jq \
1014
&& true
15+
# Upgrade all packages
16+
RUN apt-get upgrade -y
1117

1218
COPY --from=grype /grype /usr/local/bin/grype
1319
COPY --from=syft /syft /usr/local/bin/syft
1420

15-
RUN grype version
16-
RUN syft version
17-
18-
# Upgrade all packages
19-
RUN apt-get upgrade -y
21+
LABEL org.opencontainers.image.source=https://github.com/cloudfoundry-incubator/concourse-cve-scan

0 commit comments

Comments
 (0)