Skip to content

Commit ed3027b

Browse files
author
Shubham Chaudhary
authored
Merge pull request #20 from uditgaurav/github_actions
Chore(actions): Add GitHub Action CI and remove travis
2 parents 57f5329 + 4e5382e commit ed3027b

File tree

4 files changed

+136
-50
lines changed

4 files changed

+136
-50
lines changed

.github/workflows/build.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: litmus-python-ci
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Checking syntax of shell script
20+
run: bash -c 'shopt -s globstar nullglob; shellcheck **/*.{sh,ksh,bash}' || true
21+
22+
- name: Installing and configuring dependencies
23+
run: make deps
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v1
27+
with:
28+
platforms: all
29+
30+
- name: Set up Docker Buildx
31+
id: buildx
32+
uses: docker/setup-buildx-action@v1
33+
with:
34+
version: latest
35+
36+
- name: Build Image
37+
run: make build
38+

.github/workflows/push.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: litmus-python-ci
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- '**'
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
15+
push:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v1
23+
with:
24+
platforms: all
25+
26+
- name: Set up Docker Buildx
27+
id: buildx
28+
uses: docker/setup-buildx-action@v1
29+
with:
30+
version: latest
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v1
34+
with:
35+
username: ${{ secrets.DNAME }}
36+
password: ${{ secrets.DPASS }}
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v2
40+
with:
41+
push: true
42+
file: Dockerfile
43+
platforms: linux/amd64,linux/arm64
44+
tags: litmuschaos/py-runner:ci

.github/workflows/release-build.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: release
3+
4+
on:
5+
create:
6+
tags:
7+
- '**'
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Set Tag
21+
run: |
22+
TAG="${GITHUB_REF#refs/*/}"
23+
echo "TAG=${TAG}" >> $GITHUB_ENV
24+
echo "RELEASE_TAG=${TAG}" >> $GITHUB_ENV
25+
26+
- name: Print Tag info
27+
run: |
28+
echo "RELEASE TAG: ${RELEASE_TAG}"
29+
echo "${RELEASE_TAG}" > ${{ github.workspace }}/tag.txt
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v1
33+
with:
34+
platforms: all
35+
36+
- name: Set up Docker Buildx
37+
id: buildx
38+
uses: docker/setup-buildx-action@v1
39+
with:
40+
version: latest
41+
42+
- name: Login to Docker Hub
43+
uses: docker/login-action@v1
44+
with:
45+
username: ${{ secrets.DNAME }}
46+
password: ${{ secrets.DPASS }}
47+
48+
- name: Build and push
49+
uses: docker/build-push-action@v2
50+
with:
51+
push: true
52+
file: Dockerfile
53+
platforms: linux/amd64,linux/arm64
54+
tags: litmuschaos/py-runner:${{ env.RELEASE_TAG }},litmuschaos/py-runner:latest

.travis.yml

-50
This file was deleted.

0 commit comments

Comments
 (0)