Skip to content

Commit

Permalink
Maintenance
Browse files Browse the repository at this point in the history
-Update hook source.
-Switch to Python3.
-Multi-platform test build.
  • Loading branch information
kjake committed Mar 23, 2024
1 parent 16635af commit 12622fb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/anchore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@main
- name: Build the Docker image
run: docker build . --file Dockerfile --tag localbuild/testimage:latest
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
uses: anchore/scan-action@main
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: build local container
uses: docker/build-push-action@v5
with:
tags: localbuild/testimage:latest
push: false
load: true
- name: Scan image
uses: anchore/scan-action@v3
with:
image: "localbuild/testimage:latest"
acs-report-enable: true
output-format: sarif
fail-build: false
severity-cutoff: high
severity-cutoff: critical
only-fixed: true
- name: Upload Anchore Scan Report
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
26 changes: 15 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME:latest

- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Push image
run: |
docker image push $IMAGE_NAME:latest
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/386,linux/amd64,linux/arm64,linux/arm64/v8,linux/arm/v7,linux/arm/v5,linux/mips64le,linux/ppc64le,linux/s390x
tags: ${{ env.IMAGE_NAME }}:latest
push: true
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN apk add --update curl openssl bash git && \
git clone https://github.com/dehydrated-io/dehydrated && \
cd dehydrated && \
mkdir hooks && \
git clone https://github.com/walcony/letsencrypt-cloudflare-hook hooks/cloudflare && \
pip install -r hooks/cloudflare/requirements.txt && \
git clone https://github.com/SeattleDevs/letsencrypt-cloudflare-hook hooks/cloudflare && \
pip3 install -r hooks/cloudflare/requirements.txt && \
apk del git && \
rm -rf /var/cache/apk/* /tmp/* /var/tmp/ && \
chmod +x /etc/periodic/daily/dehydrated && \
Expand Down

0 comments on commit 12622fb

Please sign in to comment.