Skip to content

Commit 6ef1425

Browse files
committed
Replace Travis CI with GitHub Actions
1 parent 94b101a commit 6ef1425

File tree

3 files changed

+78
-20
lines changed

3 files changed

+78
-20
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
tags: ["*"]
7+
pull_request:
8+
branches: ["master"]
9+
schedule:
10+
- cron: "0 17 * * 2"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
18+
###########
19+
# Testing #
20+
###########
21+
22+
syntax-check:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
version: ["7.0.0", "10.0.0", "11.0.0"]
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: alex-oleshkevich/setup-ansible@1.0.1
31+
with:
32+
version: ${{ matrix.version }}
33+
34+
- name: Prepare Ansible project
35+
run: |
36+
mkdir -p tests/roles/
37+
ln -s ../../ tests/roles/coreos-bootstrap
38+
39+
- run: ansible-playbook -i tests/inventory tests/test.yml --syntax-check
40+
41+
42+
43+
44+
#############
45+
# Releasing #
46+
#############
47+
48+
release-github:
49+
name: release (GitHub)
50+
if: ${{ github.event_name == 'push'
51+
&& startsWith(github.ref, 'refs/tags/') }}
52+
needs: ["syntax-check"]
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- name: Parse semver versions from Git tag
58+
id: semver
59+
uses: actions-ecosystem/action-regex-match@v2
60+
with:
61+
text: ${{ github.ref }}
62+
regex: '^refs/tags/((([0-9]+)\.[0-9]+)(\.[0-9]+)?-(.+))$'
63+
64+
- name: Parse CHANGELOG link
65+
id: changelog
66+
run: echo "link=${{ github.server_url }}/${{ github.repository }}/blob/${{ steps.semver.outputs.group1 }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.semver.outputs.group1 }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)"
67+
>> $GITHUB_OUTPUT
68+
69+
- name: Create GitHub release
70+
uses: softprops/action-gh-release@v2
71+
with:
72+
name: ${{ steps.semver.outputs.group1 }}
73+
body: |
74+
[Changelog](${{ steps.changelog.outputs.link }})

.travis.yml

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

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
coreos-bootstrap
22
================
33

4-
[![GitHub release](https://img.shields.io/github/release/instrumentisto/ansible-coreos-bootstrap.svg)](https://github.com/instrumentisto/ansible-coreos-bootstrap/releases/latest) [![Build Status](https://travis-ci.org/instrumentisto/ansible-coreos-bootstrap.svg?branch=master)](https://travis-ci.org/instrumentisto/ansible-coreos-bootstrap) [![Python](https://img.shields.io/badge/Python-3.11-blue.svg)](https://www.pypy.org/) [![PyPy](https://img.shields.io/badge/PyPy-7.3.19-blue.svg)](https://www.pypy.org/)
4+
[![GitHub release](https://img.shields.io/github/release/instrumentisto/ansible-coreos-bootstrap.svg)](https://github.com/instrumentisto/ansible-coreos-bootstrap/releases/latest)
5+
[![CI](https://github.com/instrumentisto/ansible-coreos-bootstrap/actions/workflows/ci.yml/badge.svg?branch=master "CI")](https://github.com/instrumentisto/ansible-coreos-bootstrap/actions?query=workflow%3ACI+branch%3Amaster)
6+
[![Python](https://img.shields.io/badge/Python-3.11-blue.svg)](https://www.pypy.org)
7+
[![PyPy](https://img.shields.io/badge/PyPy-7.3.19-blue.svg)](https://www.pypy.org)
58

69
Control [Fedora CoreOS] with Ansible.
710

0 commit comments

Comments
 (0)