Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
workflow_dispatch:


jobs:

build:
name: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"

- name: Run Go tests
run: go test -v ./...

- name: Run Go vet
run: go vet -v ./...

- name: Build
run: go build -o bin/virtwork ./cmd/virtwork/...
35 changes: 35 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Image

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:

image:
name: image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"

- name: Login to Quay.io
uses: docker/login-action@v4
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: false
tags: quay.io/opdev/virtwork:dev
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: golangci
on:
merge_group:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]


jobs:

lint:
name: golangci-lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"

- name: Run linter
uses: golangci/golangci-lint-action@v9
with:
version: 'v2.10'
cache-invalidation-interval: 7