Skip to content

Commit c9652ce

Browse files
authored
ci: migrating to GitHub actions (#6)
* adds gha * removes cci
1 parent f92b02d commit c9652ce

File tree

4 files changed

+92
-81
lines changed

4 files changed

+92
-81
lines changed

.circleci/config.yml

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

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Each line is a file pattern followed by one or more owners.
2+
3+
# GH action
4+
.github/ @aaron-steinfeld @jbahire @kotharironak @buchi-busireddy
5+

.github/workflows/pr-build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build and validate
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request_target:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-20.04
13+
steps:
14+
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
15+
- name: Check out code
16+
uses: actions/checkout@v2.3.4
17+
with:
18+
ref: ${{github.event.pull_request.head.ref}}
19+
repository: ${{github.event.pull_request.head.repo.full_name}}
20+
fetch-depth: 0
21+
22+
- name: create checksum file
23+
uses: hypertrace/github-actions/checksum@main
24+
25+
- name: Cache packages
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.gradle
29+
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
30+
restore-keys: |
31+
gradle-packages-${{ runner.os }}-${{ github.job }}
32+
gradle-packages-${{ runner.os }}
33+
34+
- name: Login to Docker Hub
35+
uses: docker/login-action@v1
36+
with:
37+
username: ${{ secrets.DOCKERHUB_READ_USER }}
38+
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
39+
40+
- name: Build with Gradle
41+
uses: hypertrace/github-actions/gradle@main
42+
with:
43+
args: dockerBuildImages

.github/workflows/publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish artifacts
2+
on:
3+
# Will only run when release is published.
4+
release:
5+
types:
6+
- created
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish-artifacts:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
14+
- name: Check out code
15+
uses: actions/checkout@v2.3.4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: create checksum file
20+
uses: hypertrace/github-actions/checksum@main
21+
22+
- name: Cache packages
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.gradle
26+
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
27+
restore-keys: |
28+
gradle-packages-${{ runner.os }}-${{ github.job }}
29+
gradle-packages-${{ runner.os }}
30+
31+
- name: Login to Docker Hub
32+
uses: docker/login-action@v1
33+
with:
34+
username: ${{ secrets.DOCKERHUB_READ_USER }}
35+
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
36+
37+
- name: publish docker image
38+
uses: hypertrace/github-actions/gradle@main
39+
with:
40+
args: dockerPushImages
41+
env:
42+
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_PUBLISH_USER }}
43+
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }}
44+

0 commit comments

Comments
 (0)