Skip to content

Commit

Permalink
💚 Update tag release config (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone authored Dec 29, 2023
1 parent e4571cd commit cc228a7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
with:
images: |
ghcr.io/${{ github.repository }}
flavor: |
latest=auto
suffix=-debian,onlatest=true
tags: |
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
Expand All @@ -61,8 +64,8 @@ jobs:
with:
context: .
file: build/Dockerfile
platforms: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
platforms: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
Expand Down Expand Up @@ -101,6 +104,9 @@ jobs:
with:
images: |
ghcr.io/${{ github.repository }}
flavor: |
latest=auto
suffix=-debian,onlatest=true
tags: |
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
Expand All @@ -113,8 +119,8 @@ jobs:
with:
context: .
file: build/Dockerfile.debian
platforms: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
platforms: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
Expand Down Expand Up @@ -165,8 +171,8 @@ jobs:
with:
context: .
file: build/Dockerfile.builder
platforms: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
platforms: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Features

* Add changlog config
* Add changlog config ([#263](https://github.com/go-sigma/sigma/issues/263))
* Add introduction for sigma ([#260](https://github.com/go-sigma/sigma/issues/260))
* Show elapsed on builder page ([#257](https://github.com/go-sigma/sigma/issues/257))
* Change cache api ([#256](https://github.com/go-sigma/sigma/issues/256))
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ docker-build: ## Use the dockerfile to build the sigma image
docker-build-builder: ## Use the dockerfile to build the sigma-builder image
docker buildx build -f build/Dockerfile.builder --platform $(DOCKER_PLATFORMS) --progress plain --output type=docker,name=$(DOCKER_REGISTRY)/$(BINARY_NAME)-builder:latest,push=false,oci-mediatypes=true .

## Format:
format: sql-format

sql-format: ## format all sql files
@find ${PWD}/pkg/dal/migrations -type f -iname "*.sql" -print | xargs pg_format -s 2 --inplace

## Misc:
migration-create: ## Create a new migration file
@migrate create -dir ./migrations -seq -digits 4 -ext sql $(MIGRATION_NAME)

sql-format: ## Format all sql files
@find ${PWD}/pkg/dal/migrations -type f -iname "*.sql" -print | xargs pg_format -s 2 --inplace

changelog: ## Generate changelog
@docker run -v "${PWD}":/workdir quay.io/git-chglog/git-chglog:latest -o CHANGELOG.md

gormgen: ## Generate gorm model from database
@$(GOCMD) run ./pkg/dal/cmd/gen.go

Expand Down

0 comments on commit cc228a7

Please sign in to comment.