This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
generated from homecentr/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Certbot update, base image bumped, repo clean up (#47)
BREAKING CHANGE: Certbot updated (9 minor versions), base image updated one based on Alpine 3.14
- Loading branch information
Showing
13 changed files
with
80 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,11 @@ env: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up java for tests execution | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Set tag var | ||
id: vars | ||
|
@@ -30,17 +28,7 @@ jobs: | |
run: docker build . -t ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }} | ||
|
||
- name: Test Docker image | ||
run: cd tests && sudo gradle test --info -Ddocker_image_tag=${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }} -Droot_domain=${{ secrets.ROOT_DOMAIN }} -Dacme_email=${{ secrets.ACME_EMAIL }} -Dcloudflare_token=${{ secrets.CLOUDFLARE_TOKEN }} | ||
|
||
- name: Scan with Phonito Security | ||
uses: phonito/phonito-scanner-action@master | ||
with: | ||
image: ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }} | ||
phonito-token: '${{ secrets.PHONITO_TOKEN }}' | ||
|
||
- name: Scan with Snyk | ||
uses: snyk/actions/[email protected] | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
image: ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }} | ||
run: cd tests && sudo --preserve-env gradle test --info -Ddocker_image_tag=${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }} -Droot_domain=${{ secrets.ROOT_DOMAIN }} -Dacme_email=${{ secrets.ACME_EMAIL }} -Dcloudflare_token=${{ secrets.CLOUDFLARE_TOKEN }} | ||
env: # To allow downloading packages | ||
GITHUB_USERNAME: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,16 +10,14 @@ env: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # To add version tags | ||
packages: write # To push docker image | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up java for tests execution | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: "Determine release version" | ||
uses: codfish/semantic-release-action@master | ||
uses: docker://ghcr.io/codfish/semantic-release-action:v1.9.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -29,7 +27,11 @@ jobs: | |
- name: "Build Docker image" | ||
if: env.RELEASE_VERSION != '' | ||
run: | | ||
docker build . -t "$IMAGE_NAME:$RELEASE_VERSION" \ | ||
docker build . \ | ||
--tag "$IMAGE_NAME:$RELEASE_VERSION" \ | ||
--tag "$IMAGE_NAME:latest" \ | ||
--tag "ghcr.io/$IMAGE_NAME:$RELEASE_VERSION" \ | ||
--tag "ghcr.io/$IMAGE_NAME:latest" \ | ||
--label "org.label-schema.schema-version=1.0" \ | ||
--label "org.label-schema.vcs-ref=${GITHUB_SHA}" \ | ||
--label "org.label-schema.vcs-url=https://github.com/${GITHUB_REPOSITORY}" \ | ||
|
@@ -40,43 +42,33 @@ jobs: | |
- name: Test Docker image | ||
if: env.RELEASE_VERSION != '' | ||
run: cd tests && sudo gradle test -Ddocker_image_tag=${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }} -Droot_domain=${{ secrets.ROOT_DOMAIN }} -Dacme_email=${{ secrets.ACME_EMAIL }} -Dcloudflare_token=${{ secrets.CLOUDFLARE_TOKEN }} | ||
run: cd tests && sudo --preserve-env gradle test -Ddocker_image_tag=${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }} -Droot_domain=${{ secrets.ROOT_DOMAIN }} -Dacme_email=${{ secrets.ACME_EMAIL }} -Dcloudflare_token=${{ secrets.CLOUDFLARE_TOKEN }} | ||
env: # To allow downloading packages | ||
GITHUB_USERNAME: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Scan with Phonito Security | ||
if: env.RELEASE_VERSION != '' | ||
uses: phonito/phonito-scanner-action@master | ||
with: | ||
image: ${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }} | ||
phonito-token: '${{ secrets.PHONITO_TOKEN }}' | ||
|
||
- name: Scan with Snyk | ||
if: env.RELEASE_VERSION != '' | ||
uses: snyk/actions/[email protected] | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
image: ${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }} | ||
|
||
- name: "Tag image as latest" | ||
if: env.RELEASE_VERSION != '' | ||
run: "docker tag $IMAGE_NAME:$RELEASE_VERSION $IMAGE_NAME:latest" | ||
|
||
# Docker hub | ||
- name: "Log into Docker Hub" | ||
if: env.RELEASE_VERSION != '' | ||
run: "echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin" | ||
|
||
- name: "Push versioned image" | ||
if: env.RELEASE_VERSION != '' | ||
run: "docker push $IMAGE_NAME:$RELEASE_VERSION" | ||
|
||
- name: "Push latest image" | ||
- name: "Push to DockerHub" | ||
if: env.RELEASE_VERSION != '' | ||
run: "docker push $IMAGE_NAME:latest" | ||
run: "docker push $IMAGE_NAME:$RELEASE_VERSION && docker push $IMAGE_NAME:latest" | ||
|
||
- name: "Update Docker Hub description" | ||
if: env.RELEASE_VERSION != '' | ||
uses: peter-evans/dockerhub-description@v2.2.0 | ||
uses: peter-evans/dockerhub-description@v2.4.3 | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
DOCKERHUB_REPOSITORY: ${{ env.IMAGE_NAME }} | ||
|
||
# GitHub Packages | ||
- name: "Log into GitHub Packages" | ||
if: env.RELEASE_VERSION != '' | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: "Push to GitHub Packages" | ||
if: env.RELEASE_VERSION != '' | ||
run: "docker push ghcr.io/$IMAGE_NAME:$RELEASE_VERSION && docker push ghcr.io/$IMAGE_NAME:latest" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ gradle-app.setting | |
!gradle-wrapper.jar | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
.gradletasknamecache | ||
|
||
*.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rootProject.name = 'docker-$$IMAGE_NAME$$-tests' | ||
rootProject.name = 'docker-certbot-tests' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters