-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set version to match included certbot version (#29)
* Set version to match included certbot version Require python3.7<4.0, removes support for python3.6 Pin acme and certbot to 2.6.0 Remove urllib3 from requirements, it makes no sense being there Poetry upgrade Add .venv and remove node_modules and yarn.lock from gitignore, we dont use node in this project Add more labels to docker image Clean up ci.yaml and add some features Use certbot/certbot:v2.6.0 for the docker base rather than latest, probably the cause of all of the issues - Can be set with --build-arg VERSION=v2.6.0 in the future with the ci * Update readme Signed-off-by: miigotu <[email protected]>
- Loading branch information
Showing
6 changed files
with
427 additions
and
352 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 |
---|---|---|
|
@@ -4,66 +4,146 @@ on: | |
push: | ||
branches: | ||
- 'main' | ||
- 'dev' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
SLEEP: 60 | ||
DOCKER_BUILDKIT: '1' | ||
TARGET_PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v6" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
ShellCheck: | ||
lint: | ||
name: Lint files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
persist-credentials: false | ||
- name: Shellcheck | ||
- | ||
name: Check shell scripts | ||
uses: ludeeus/action-shellcheck@master | ||
|
||
Docker: | ||
needs: [Shellcheck] | ||
environment: | ||
name: Set up environment for docker and poetry | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
outputs: | ||
docker_tags: ${{ steps.docker.outputs.tags }} | ||
docker_labels: ${{ steps.docker.outputs.labels }} | ||
steps: | ||
- name: Checkout | ||
- | ||
name: Cache environment files | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/buildkitd.toml | ||
key: ${{ github.workflow }}-environment | ||
- | ||
name: Create buildkitd config | ||
run: | | ||
echo 'experimantal = true' > /tmp/buildkitd.toml | ||
echo 'debug = true' >> /tmp/buildkitd.toml | ||
echo 'insecure-entitlements = [ "security.insecure" ]' >> /tmp/buildkitd.toml | ||
# echo '[worker.oci]' >> /tmp/buildkitd.toml | ||
# echo 'max-parallelism = 1' >> /tmp/buildkitd.toml | ||
cat /tmp/buildkitd.toml | ||
- | ||
name: Set up Docker metadata | ||
id: docker | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ github.repository }} | ||
ghcr.io/${{ github.repository }} | ||
labels: | | ||
org.opencontainers.image.source=https://github.com/miigotu/certbot-dns-godaddy | ||
org.opencontainers.image.url=https://github.com/miigotu/certbot-dns-godaddy | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=raw,prefix=${{ github.ref_name }},suffix=,value=${{ github.run_id }},event=push | ||
type=raw,prefix=${{ github.ref_name }},suffix=,value=${{ github.sha }},event=push | ||
type=raw,prefix=,suffix=,value=${{ github.head_ref }},event=pr | ||
type=raw,prefix=,suffix=,value=${{ github.ref_name }},event=push,enable=${{ github.event_name != 'pull_request' }} | ||
type=edge,branch=dev | ||
type=semver,pattern={{version}},enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
type=semver,pattern={{major}}.{{minor}},enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
docker: | ||
name: Build and push docker images | ||
needs: [environment, lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
- | ||
name: Restore environment files | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/buildkitd.toml | ||
key: ${{ github.workflow }}-environment | ||
restore-keys: ${{ github.workflow }}-environment | ||
- | ||
name: Set up QEMU | ||
if: success() | ||
id: qemu | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
- | ||
name: Set up Docker Buildx | ||
if: success() | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
- | ||
name: Login to GitHub Container Registry | ||
if: success() | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to DockerHub | ||
- | ||
name: Login to DockerHub | ||
if: success() | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
- | ||
name: Build and push docker image | ||
if: success() | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: "linux/amd64,linux/arm64,linux/arm/v6" | ||
push: true | ||
tags: | | ||
${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:latest | ||
Poetry: | ||
needs: [Shellcheck] | ||
platforms: ${{ env.TARGET_PLATFORMS }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ needs.environment.outputs.docker_labels }} | ||
tags: ${{ needs.environment.outputs.docker_tags }} | ||
poetry: | ||
name: Build and publish wheels | ||
needs: [environment, lint, docker] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and publish to pypi | ||
- | ||
uses: actions/checkout@v3 | ||
- | ||
name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.idea | ||
.venv | ||
dist | ||
*.ini | ||
*.log* | ||
work | ||
yarn.lock | ||
node_modules |
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,4 +1,6 @@ | ||
FROM certbot/certbot | ||
ARG VERSION=v2.6.0 | ||
FROM certbot/certbot:$VERSION | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/miigotu/certbot-dns-godaddy" | ||
LABEL maintainer="[email protected]" | ||
ENV PYTHONIOENCODING="UTF-8" | ||
|
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
Oops, something went wrong.