Skip to content

Commit 8f5cacc

Browse files
Split test and release workflows
1 parent 39fa74f commit 8f5cacc

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,24 @@
1-
name: CI
1+
name: Release
22

33
on:
44
push:
55
branches:
6-
- '**'
6+
- '**' # TODO: master only
77

88
jobs:
9-
test:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: checkout
13-
uses: actions/checkout@v3
14-
- name: Build and test Docker image
15-
uses: docker/build-push-action@v4
16-
with:
17-
context: .
18-
target: test
19-
209
doc:
2110
runs-on: ubuntu-latest
2211
steps:
23-
- name: checkout
12+
- name: Checkout
2413
uses: actions/checkout@v3
25-
- name: Build docs Docker image
14+
- name: Build docs
2615
uses: docker/build-push-action@v4
2716
with:
2817
context: .
2918
target: docs-site
3019
outputs: type=local,dest=.
20+
- name: log output
21+
run: ls -la ./site
3122
- name: Deploy docs to GitHub Pages
3223
if: github.ref == 'refs/heads/master'
3324
uses: peaceiris/actions-gh-pages@v3
@@ -38,8 +29,13 @@ jobs:
3829
release:
3930
runs-on: ubuntu-latest
4031
steps:
41-
- name: checkout
32+
- name: Checkout
4233
uses: actions/checkout@v3
34+
- name: Run tests
35+
uses: docker/build-push-action@v4
36+
with:
37+
context: .
38+
target: test
4339
- name: Setup Node.js
4440
uses: actions/setup-node@v3
4541
with:

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Run tests
15+
uses: docker/build-push-action@v4
16+
with:
17+
context: .
18+
target: test
19+
- name: Test doc build
20+
uses: docker/build-push-action@v4
21+
with:
22+
context: .
23+
target: docs-site

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://github.com/baloise/gitopscli/actions/workflows/main.yml/badge.svg)](https://github.com/baloise/gitopscli/actions/workflows/main.yml)
1+
[![Build Status](https://github.com/baloise/gitopscli/actions/workflows/release.yml/badge.svg)](https://github.com/baloise/gitopscli/actions/workflows/release.yml)
22
[![Latest Release)](https://img.shields.io/github/v/release/baloise/gitopscli)](https://github.com/baloise/gitopscli/releases)
33
[![Docker Pulls](https://img.shields.io/docker/pulls/baloise/gitopscli)](https://hub.docker.com/r/baloise/gitopscli/tags)
44
[![Python: 3.10](https://img.shields.io/badge/python-3.10-yellow.svg)](https://www.python.org/downloads/release/python-3108/)

0 commit comments

Comments
 (0)