Skip to content

Commit

Permalink
fix: cd workflows in server directory
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Guidée <[email protected]>
  • Loading branch information
quentinguidee committed Mar 3, 2024
1 parent 5f304f7 commit d698b61
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Go to server directory
run: cd server

- name: Check if workflow files changed
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
workflows-changed:
- '.github/workflows/**.yml'
go-changed:
- 'go.mod'
- 'go.sum'
Expand All @@ -46,6 +47,9 @@ jobs:
with:
go-version: '1.21'

- name: Go to server directory
run: cd server

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -65,6 +69,9 @@ jobs:
with:
go-version: '1.21'

- name: Go to server directory
run: cd server

- name: Run test with coverage
run: |
go test -coverprofile=coverage.out -json ./... > report.json
Expand All @@ -82,6 +89,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Go to server directory
run: cd server

- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -133,6 +143,7 @@ jobs:

- name: Build
run: |
cd server
go build -o vertex ./cmd/main
go build -o vertex-kernel ./cmd/kernel
env:
Expand Down Expand Up @@ -164,6 +175,7 @@ jobs:

- name: Build
run: |
cd server
go build -o app ./apps/${{ matrix.app-id }}/cmd/${{ matrix.app-kind }}
build-docker-bundle:
Expand All @@ -180,7 +192,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Docker Buildx
uses: server/docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3

- name: Setup metadata
id: meta
Expand All @@ -200,8 +212,8 @@ jobs:
uses: docker/build-push-action@v5
with:
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
context: .
file: server/docker/bundle.Dockerfile
context: server
file: docker/bundle.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm
no-cache: true
Expand Down Expand Up @@ -255,8 +267,8 @@ jobs:
uses: docker/build-push-action@v5
with:
push: ${{ github.ref == 'refs/heads/main' }}
context: .
file: server/docker/micro.Dockerfile
context: server
file: docker/micro.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm
no-cache: true
Expand Down

0 comments on commit d698b61

Please sign in to comment.