Skip to content

Commit

Permalink
feat: add docker build and github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 19, 2023
1 parent c05ec01 commit 3c3bdf2
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: test
on:
- push
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --enable-all --timeout=30m

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: extractions/setup-just@v1
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.19"
- run: go test -v ./... -covermode=atomic -coverprofile=coverage.out
- uses: codecov/[email protected]
with:
files: coverage.out

docker:
name: docker
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/bake-action@v4
with:
files: "build/package/docker-bake.json"
push: true
File renamed without changes.
17 changes: 17 additions & 0 deletions build/package/docker-bake.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"group": {
"default": {
"targets": [
"soteria"
]
}
},
"target": {
"koochooloo": {
"dockerfile": "build/package/Dockerfile",
"tags": [
"ghcr.io/snapp-incubator/soteria"
]
}
}
}

0 comments on commit 3c3bdf2

Please sign in to comment.