Skip to content

Commit

Permalink
build: Replace separate hadolint, dockle and trivy by one workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Dec 19, 2023
1 parent 3f7a7b0 commit 7d74ef9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 89 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
---
name: Docker
'on':
push:
tags:
- '*'
'on': push
jobs:
release:
runs-on: ubuntu-latest
docker:
runs-on: ubuntu-20.04
steps:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
- uses: actions/[email protected]
- uses: schubergphilis/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: version
id: version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
push: true
tags: utrecht/n3dr:${{ steps.version.outputs.version }}
build-args: |
VERSION=${{ github.ref }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
dockle-accept-key: libcrypto3,libssl3
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Docker
'on':
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: version
id: version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
push: true
tags: utrecht/n3dr:${{ steps.version.outputs.version }}
build-args: |
VERSION=${{ github.ref }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
16 changes: 0 additions & 16 deletions .github/workflows/dockle.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/hadolint.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/trivy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /n3dr /usr/local/bin/n3dr
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
RUN apk add --no-cache \
libcrypto3=3.1.4-r1 \
libssl3=3.1.4-r1
libcrypto3=~3 \
libssl3=~3
USER n3dr
ENTRYPOINT ["n3dr"]

0 comments on commit 7d74ef9

Please sign in to comment.