-
Notifications
You must be signed in to change notification settings - Fork 84
53 lines (50 loc) · 1.35 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
---
name: Wikipedia Library - test and deploy
on:
push:
branches: ["master", "staging"]
pull_request:
branches: ["master"]
jobs:
cicd:
runs-on: ubuntu-latest
environment: cicd
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: build & run
run: >
sudo .cicd/build.sh
${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}
${GITHUB_SHA}
- name: migrate
run: >
docker compose exec --no-TTY twlight
/app/bin/virtualenv_migrate.sh
- name: translate
run: >
docker compose exec --no-TTY twlight
/app/bin/virtualenv_translate.sh last-commit
- name: test
run: >
docker compose exec --no-TTY twlight
/app/bin/virtualenv_test.sh
- name: deploy
env:
WIKIBOT_TOKEN: ${{secrets.WIKIBOT_TOKEN}}
QUAYBOT_USERNAME: ${{secrets.QUAYBOT_USERNAME}}
QUAYBOT_PASSWORD: ${{secrets.QUAYBOT_PASSWORD}}
run: >
sudo .cicd/deploy.sh
${GITHUB_REF_NAME}
${GITHUB_SHA}
${GITHUB_EVENT_NAME}
${GITHUB_REPOSITORY}
${WIKIBOT_TOKEN}
${QUAYBOT_USERNAME}
${QUAYBOT_PASSWORD}
- name: cleanup
if: always()
run: sudo chown -R ${USER}:${USER} .