Skip to content

Commit

Permalink
[wip] wip...
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Nov 26, 2023
1 parent ec011fe commit 0e6553a
Show file tree
Hide file tree
Showing 95 changed files with 6,342 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
41 changes: 41 additions & 0 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Docker image(dev)

on:
push:
paths:
- '.github/**'
- 'files/**'
- 'mgmt/**'
- 'Dockerfile'
- 'requirements.txt'

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/homenoc/dsbd
- uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/homenoc/dsbd:develop
labels: "develop version"
cache-from: type=gha
cache-to: type=gha,mode=max
73 changes: 73 additions & 0 deletions .github/workflows/build-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish Docker image(prod)

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: get tag name
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/homenoc/dsbd

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platform: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/homenoc/dsbd:${{ env.TAG_NAME }}
ghcr.io/homenoc/dsbd:latest
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Create Changelog
id: create_changelog
uses: mikepenz/release-changelog-builder-action@v3
with:
configurationJson: |
{
"template": "## Commit Log \n #{{UNCATEGORIZED}} \n\n **Full Change Log**: #{{RELEASE_DIFF}}",
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}",
"sort": {
"order": "DESC",
"on_property": "mergedAt"
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.create_changelog.outputs.changelog }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea/
venv/
__pycache__/
*.py[cod]
*$py.class
dsbd/develop_settings.py
*.sqlite3
Loading

0 comments on commit 0e6553a

Please sign in to comment.