diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff0dab74..676772a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,20 @@ name: CI on: push: branches: [main] + paths-ignore: + - "docs/**" + - "**.md" + - "devenv/**" pull_request: branches: [main] + paths-ignore: + - "docs/**" + - "**.md" + - "devenv/**" + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true permissions: contents: read @@ -33,6 +45,9 @@ jobs: with: go-version-file: go.mod + - name: Build + run: go build -o memoh-server ./cmd/agent + - name: Generate config run: | cat > config.toml <<'TOML' @@ -46,10 +61,10 @@ jobs: TOML - name: Migrate up - run: go run ./cmd/agent migrate up + run: ./memoh-server migrate up - name: Migrate down - run: go run ./cmd/agent migrate down + run: ./memoh-server migrate down - name: Migrate up (idempotent) - run: go run ./cmd/agent migrate up + run: ./memoh-server migrate up diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b43a7776..829a87e3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -5,8 +5,16 @@ on: tags: ["v*.*.*"] pull_request: branches: [main] + paths-ignore: + - "docs/**" + - "**.md" + - "devenv/**" workflow_dispatch: +concurrency: + group: docker-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read packages: write @@ -78,7 +86,7 @@ jobs: push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 + platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} build-args: | VERSION=${{ steps.meta.outputs.version }} COMMIT_HASH=${{ github.sha }}