-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.46 KB
/
dev-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: "Dev CI"
on:
workflow_dispatch:
inputs:
TAG:
description: "Tag to Deploy"
type: string
required: true
default: "dev"
CLEANUP:
description: "Run Cleanup"
type: boolean
required: true
default: true
push:
branches-ignore:
- master
jobs:
build:
name: "Build"
uses: ./.github/workflows/build.yaml
if: ${{ !contains(github.event.head_commit.message, '#noci') }}
permissions:
contents: read
packages: write
with:
GHCR_TAG: ${{ inputs.TAG == '' && inputs.TAG || 'dev' }}
GHCR_URI: "ghcr.io/${{ github.repository }}"
GHCR_USER: ${{ vars.GHCR_USER }}
secrets:
GHCR_PASS: ${{ secrets.GHCR_PASS }}
deploy:
name: "Deploy"
uses: ./.github/workflows/deploy.yaml
needs: build
permissions:
contents: read
with:
GHCR_TAG: ${{ inputs.TAG == '' && inputs.TAG || 'dev' }}
STACK_NAME: dev_django5-boiler
STACK_FILE: docker-compose-swarm.yaml
CONFIG_FILE: services/shane/django5-boiler/dev.env
secrets:
SERVICE_CONFIGS_KEY: ${{ secrets.SERVICE_CONFIGS_KEY }}
PORTAINER_URL: ${{ secrets.PORTAINER_URL }}
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}
cleanup:
name: "Cleanup"
uses: ./.github/workflows/cleanup.yaml
needs: deploy
if: ${{ inputs.CLEANUP != '' && inputs.CLEANUP || true }}
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}