-
Notifications
You must be signed in to change notification settings - Fork 54
62 lines (52 loc) · 1.57 KB
/
pipeline.yaml
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
56
57
58
59
60
61
62
name: Continuous testing and deployment
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
permissions: read-all
jobs:
test:
name: Run tests
runs-on: ubuntu-20.04
steps:
- name: Install goss and dgoss
uses: e1himself/[email protected]
with:
# Goss release version to install
version: 'v0.3.16'
- name: Checkout code
uses: actions/checkout@v3
- name: Build the Docker image
uses: docker/[email protected]
with:
push: false
tags: phanan/koel:test
- name: Run goss tests on the image
run: dgoss run phanan/koel:test
deploy:
name: Deploy to Docker Hub
runs-on: ubuntu-20.04
needs: [test]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/[email protected]
id: qemu
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push the production image
uses: docker/[email protected]
with:
push: true
tags: phanan/koel:latest,phanan/koel:7.0.7
platforms: linux/amd64,linux/arm64,linux/arm/v7