Skip to content

Commit 87dd37b

Browse files
Merge pull request #198 from baloise/feat/github-actions
ci: add github actions build
2 parents c1b68d9 + 370eab8 commit 87dd37b

File tree

4 files changed

+73
-56
lines changed

4 files changed

+73
-56
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
doc:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Build docs
15+
uses: docker/build-push-action@v4
16+
with:
17+
context: .
18+
target: docs-site
19+
outputs: type=local,dest=.
20+
- name: Deploy docs to GitHub Pages
21+
if: github.ref == 'refs/heads/master'
22+
uses: peaceiris/actions-gh-pages@v3
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: ./site
26+
27+
release:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
- name: Run tests
33+
uses: docker/build-push-action@v4
34+
with:
35+
context: .
36+
target: test
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: 'lts/*'
41+
- name: Install dependencies
42+
run: npm install semantic-release @semantic-release/exec @google/semantic-release-replace-plugin conventional-changelog-conventionalcommits
43+
- name: Release
44+
if: github.ref == 'refs/heads/master'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
48+
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
49+
run: npx semantic-release

.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

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.com/baloise/gitopscli.svg?branch=master)](https://travis-ci.com/baloise/gitopscli)
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)