-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simplify .dockerignore * Update dependency with CVE * Fixed EOFError on running with no arguments * Added tests * Updated documentation * Added build / push process to .github/
- Loading branch information
Showing
10 changed files
with
156 additions
and
59 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 |
---|---|---|
@@ -1,35 +1,8 @@ | ||
**/__pycache__ | ||
**/.venv | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.git-blame-ignore-revs | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.tox | ||
**/.vs | ||
**/.vscode | ||
**/.github | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/env | ||
**/venv | ||
**/docs | ||
**/tests | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
AUTHORS.md | ||
LICENSE.txt | ||
README.md | ||
** | ||
.** | ||
!.dockerignore | ||
!requirements.txt | ||
!AUTHORS.md | ||
!LICENSE.txt | ||
!README.md | ||
!tokendito/*.py |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Publish to Dockerhub | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
env: | ||
REGISTRY: docker.io | ||
IMAGE_NAME: tokendito/tokendito | ||
|
||
jobs: | ||
dockerhubpublish: | ||
name: Build and Publish Docker Container | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 2 | ||
matrix: | ||
include: | ||
- { platform: "linux/arm64", platform-tag: "arm64" } | ||
- { platform: "linux/amd64", platform-tag: "amd64" } | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: tokendito | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Build container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: false | ||
load: true | ||
platforms: ${{ matrix.platform }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
env: | ||
DOCKER_CONTENT_TRUST: 1 | ||
- name: Sign and push container image | ||
uses: sudo-bot/action-docker-sign@latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
with: | ||
image-ref: "${{ steps.meta.outputs.tags }}" | ||
private-key-id: "${{ secrets.DOCKER_PRIVATE_KEY_ID }}" | ||
private-key: "${{ secrets.DOCKER_PRIVATE_KEY }}" | ||
private-key-passphrase: "${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }}" |
File renamed without changes.
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 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,5 @@ | ||
beautifulsoup4>=4.6.0 | ||
botocore>=1.12.36 | ||
certifi>=2022.12.07 | ||
platformdirs>=2.5.4 | ||
requests>=2.19.0 |
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