Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Mar 16, 2024
2 parents c75f580 + c069e4f commit c1052fc
Show file tree
Hide file tree
Showing 69 changed files with 9,576 additions and 4,911 deletions.
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ignore everything
*

# Allow files and directories
!/main.py
!/Pipfile
!/Pipfile.lock
!/modules
!/util
!/scripts
!/config
!/VERSION
!/start.sh
!/exclude-file.txt

# Ignore unnecessary files inside allowed directories
# This should go after the allowed directories
**/*~
**/*.log
**/.DS_Store
**/Thumbs.db
**/config.yml
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ['https://www.buymeacoffee.com/drazzilb08']
53 changes: 53 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Develop Release

on:
push:
branches: [ dev ]
paths-ignore:
- '**/README.md'
- '**/.github/**'
pull_request:
types:
- closed
branches:
- dev
paths-ignore:
- '**/README.md'
- '**/.github/**'

jobs:

docker-dev:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
"BRANCH=dev"
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/daps:dev
ghcr.io/drazzilb08/daps:dev
22 changes: 22 additions & 0 deletions .github/workflows/inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 7
days-before-issue-close: 3
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GH_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Latest Release

on:
push:
branches: [ master ]
paths-ignore:
- '**/README.md'
- '**/.github/**'
pull_request:
types:
- closed
branches:
- master
paths-ignore:
- '**/README.md'
- '**/.github/**'

jobs:

docker-latest:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
"BRANCH=${{ vars.GITHUB_REF_NAME }}"
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/daps:latest
ghcr.io/drazzilb08/daps:latest
18 changes: 18 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tag

on:
push:
branches: [ master ]

jobs:
tag-new-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 2
- uses: salsify/[email protected]
with:
version-command: |
cat VERSION
56 changes: 56 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker Version Release

on:
push:
tags:
- v*

jobs:

docker-version:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
"BRANCH=${{ steps.extract_branch.outputs.branch }}"
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/daps:${{ steps.get_version.outputs.VERSION }}
ghcr.io/drazzilb08/daps:${{ steps.get_version.outputs.VERSION }}
Loading

0 comments on commit c1052fc

Please sign in to comment.