-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.17 KB
/
CICD.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
55
name: CI/CD
on:
workflow_dispatch:
push:
branches:
- master
jobs:
# CI:
# runs-on: ubuntu-latest
# environment: prod
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up JDK 21
# uses: actions/setup-java@v4.2.2
# with:
# distribution: 'temurin'
# java-version: '21'
# cache: maven
#
# - name: Run the Maven test
# run: mvn test
CD:
# needs: [CI]
runs-on: self-hosted
environment: prod
env:
TOKEN: ${{ secrets.TOKEN }}
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_SECRET: ${{ secrets.SPOTIFY_SECRET }}
YT_TOKEN: ${{ secrets.YT_TOKEN }}
YT_VISITOR: ${{ secrets.YT_VISITOR }}
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Build New Image
run: docker compose -f docker-compose.yml build
- name: Update Lil Mo
run: |
docker compose -f docker-compose.yml stop lil-mo &&
docker compose -f docker-compose.yml rm -f lil-mo &&
docker compose -f docker-compose.yml up -d
- name: Cleaning up
run: |
docker image prune -f