Skip to content

Commit 3d14a6d

Browse files
authored
Merge pull request #1 from upalatucci/github-ci
chore: github actions
2 parents d094385 + e3463a9 commit 3d14a6d

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

.github/workflows/ci_checks.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: build
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.20'
20+
21+
- name: Build
22+
run: go build .
23+
- name: Run Unit Tests
24+
run: go test .
25+

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: DEPLOY
2+
env:
3+
VERSION_TAG: ${{github.ref_name == 'main' && 'latest' || github.ref_name}}
4+
on:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- v*
10+
11+
jobs:
12+
deploy:
13+
name: deploy
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: docker/setup-qemu-action@v1
18+
- uses: docker/setup-buildx-action@v1
19+
- uses: docker/login-action@v1
20+
with:
21+
registry: quay.io
22+
username: ${{ secrets.QUAY_BOT_USER }}
23+
password: ${{ secrets.QUAY_BOT_PASS }}
24+
25+
- name: Build and push
26+
uses: docker/build-push-action@v2
27+
with:
28+
push: true
29+
tags: quay.io/kubevirt-ui/kubevirt-proxy-data:${{env.VERSION_TAG}}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19
1+
FROM golang:1.20
22

33
COPY . /app
44
WORKDIR /app

0 commit comments

Comments
 (0)