Skip to content

Commit dcda896

Browse files
committed
Update some yml.
1 parent 89bc5d4 commit dcda896

File tree

3 files changed

+96
-89
lines changed

3 files changed

+96
-89
lines changed

.github/workflows/deploy.yml

Lines changed: 53 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,66 +7,69 @@ jobs:
77
name: Test
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v1
12-
with:
13-
node-version: '15'
14-
check-latest: true
15-
- name: Cache node modules
16-
uses: actions/cache@v2
17-
with:
18-
path: node_modules
19-
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
20-
restore-keys: |
21-
${{ runner.OS }}-build-${{ env.cache-name }}-
22-
${{ runner.OS }}-build-
23-
${{ runner.OS }}-
24-
- run: make envvar
10+
- uses: actions/checkout@v2
2511

26-
# Pull the latest image to build, and avoid caching pull-only images.
27-
# (docker pull is faster than caching in most cases.)
28-
- run: docker-compose pull
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: "15"
15+
check-latest: true
2916

30-
# In this step, this action saves a list of existing images,
31-
# the cache is created without them in the post run.
32-
# It also restores the cache if it exists.
33-
- uses: satackey/action-docker-layer-caching@v0.0.11
34-
# Ignore the failure of a step and avoid terminating the job.
35-
continue-on-error: true
17+
- name: Cache node modules
18+
uses: actions/cache@v2
19+
with:
20+
path: node_modules
21+
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.OS }}-build-${{ env.cache-name }}-
24+
${{ runner.OS }}-build-
25+
${{ runner.OS }}-
3626
37-
- run: make image
27+
- run: make envvar
3828

39-
- run: make test
29+
# Pull the latest image to build, and avoid caching pull-only images.
30+
# (docker pull is faster than caching in most cases.)
31+
- run: docker-compose pull
32+
33+
# In this step, this action saves a list of existing images,
34+
# the cache is created without them in the post run.
35+
# It also restores the cache if it exists.
36+
- uses: satackey/action-docker-layer-caching@v0.0.11
37+
# Ignore the failure of a step and avoid terminating the job.
38+
continue-on-error: true
39+
40+
- run: make image
41+
42+
- run: make test
4043

4144
deploy:
4245
name: Deploy
4346
runs-on: ubuntu-latest
4447
needs: [test]
4548
steps:
46-
- name: Cancel Previous Runs
47-
uses: styfle/cancel-workflow-action@0.4.0
48-
with:
49-
access_token: ${{ github.token }}
49+
- name: Cancel Previous Runs
50+
uses: styfle/cancel-workflow-action@0.4.0
51+
with:
52+
access_token: ${{ github.token }}
5053

51-
- name: Checkout
52-
uses: actions/checkout@v2
53-
with:
54-
fetch-depth: 0
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
with:
57+
fetch-depth: 0
5558

56-
- name: Push
57-
uses: dokku/github-action@v1
58-
# enable verbose ssh output
59-
with:
60-
# specify `--force` as a flag for git pushes
61-
git_push_flags: '--force'
62-
git_remote_url: ${{ secrets.SSH_REMOTE_URL }}
63-
ssh_private_key: ${{ secrets.PRIVATE_KEY }}
59+
- name: Push
60+
uses: dokku/github-action@v1
61+
# enable verbose ssh output
62+
with:
63+
# specify `--force` as a flag for git pushes
64+
git_push_flags: "--force"
65+
git_remote_url: ${{ secrets.SSH_REMOTE_URL }}
66+
ssh_private_key: ${{ secrets.PRIVATE_KEY }}
6467

65-
- name: Create Sentry release
66-
uses: getsentry/action-release@v1
67-
env:
68-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
69-
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
70-
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
71-
with:
72-
environment: production
68+
- name: Create Sentry release
69+
uses: getsentry/action-release@v1
70+
env:
71+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
72+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
73+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
74+
with:
75+
environment: production

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
on: [push, pull_request, workflow_dispatch]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "15"
16+
check-latest: true
17+
18+
- name: Cache node modules
19+
uses: actions/cache@v2
20+
with:
21+
path: node_modules
22+
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.OS }}-build-${{ env.cache-name }}-
25+
${{ runner.OS }}-build-
26+
${{ runner.OS }}-
27+
28+
- run: make envvar
29+
30+
# Pull the latest image to build, and avoid caching pull-only images.
31+
# (docker pull is faster than caching in most cases.)
32+
- run: docker-compose pull
33+
34+
# In this step, this action saves a list of existing images,
35+
# the cache is created without them in the post run.
36+
# It also restores the cache if it exists.
37+
- uses: satackey/action-docker-layer-caching@v0.0.11
38+
# Ignore the failure of a step and avoid terminating the job.
39+
continue-on-error: true
40+
41+
- run: make image
42+
43+
- run: make test

.github/workflows/tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)