-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (33 loc) · 1.1 KB
/
test.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
name: Test
on: pull_request
env:
DOCKER_IMAGE: '${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}'
jobs:
test:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/[email protected]
with:
submodules: true
- name: Set env BRANCH_TAG
uses: nimblehq/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker pull
if: env.BRANCH_TAG != 'latest' && env.BRANCH_TAG != 'develop'
run: docker-compose -f docker-compose.test.yml pull || true
- name: Build Docker image
run: docker-compose -f docker-compose.test.yml build
- name: Docker push
run: docker-compose -f docker-compose.test.yml push
- name: HTML Linter
run: ./bin/docker-test