-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.69 KB
/
workflow.yml
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
name: Workflow
on:
push:
branches: [ main ]
pull_request: { }
jobs:
validate-renovate-config:
uses: BlindfoldedSurgery/renovate-config/.github/workflows/validate.yml@main
lint:
uses: BlindfoldedSurgery/actions-python/.github/workflows/lint.yml@v1
with:
python-version: '3.12'
test:
uses: BlindfoldedSurgery/actions-python/.github/workflows/test.yml@v1
with:
python-version: '3.12'
build-container-image:
needs:
- lint
- test
uses: BlindfoldedSurgery/actions-container/.github/workflows/build-image-docker.yml@v3
with:
push-image: ${{ github.ref_name == github.event.repository.default_branch }}
deploy:
runs-on: ubuntu-latest
needs:
- build-container-image
if: success() && github.ref_name == github.event.repository.default_branch
concurrency: production
steps:
- uses: actions/checkout@v4
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Substitute environment variables in values.yaml
run: "envsubst < values.yaml > values_sub.yaml && mv values_sub.yaml values.yaml"
env:
IMAGE_NAME: "ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG }}"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
- uses: WyriHaximus/github-action-helm3@v3
with:
exec: helm upgrade location-bot . --install --namespace=telegram-bots --atomic
kubeconfig: '${{ secrets.KUBECONFIG_RAW }}'
clean:
concurrency: cleanup
needs: [ deploy ]
uses: BlindfoldedSurgery/actions-container/.github/workflows/clean.yml@v3