Commit Graph

22 Commits

Author SHA1 Message Date
appleboy 741442ba9a
ci: enhance Docker workflow with ARM64 support and caching
- Add support for `linux/arm64` platform in Docker workflow
- Enable build cache from and to registry in Docker workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-06-22 11:04:57 +08:00
Bo-Yi Wu bfe56a1c59
ci: update testing workflow and changelog configuration
- Update golangci-lint-action from v3 to v6 in testing workflow
- Remove specific version (v1.56.2) for golangci-lint-action in testing workflow
- Add changelog format specification in .goreleaser.yaml

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-12 10:11:22 +08:00
Bo-Yi Wu 79e439dbc7
ci: update goreleaser action and version specification
- Update `goreleaser` action from v5 to v6
- Change `goreleaser` version specification to `~> v2`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-11 11:20:41 +08:00
Bo-Yi Wu a4b8f12321
chore: refactor changelog management and configuration
- Remove the `project_name` field
- Change changelog source from `git` to `gitea`
- Add new changelog categories for refactor, build process updates, and documentation updates
- Remove the changelog order and filters configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-11 11:19:00 +08:00
Bo-Yi Wu 058d36bc64
ci: enhance CI Workflow and Update Ignore Rules
- Add a new 'testing' job to the Gitea workflow with steps for checkout, setup Go, caching, building, and testing
- Include 'bin' directory in the .gitignore file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-20 09:54:17 +08:00
Bo-Yi Wu f171daa81a
feat: implement example-go service with Docker support
- Add a new Makefile with build, docker-build, test, and clean targets, including cross-compilation support for Linux AMD64 and ARM64.
- Introduce a new Go executable `example-go` with a basic HTTP server setup.
- Create a new Dockerfile for an Alpine-based container including the `example-go` binary, with metadata labels and an entrypoint.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-20 09:51:50 +08:00
Bo-Yi Wu 9d1d40c08a
chore: refactor build process and repository cleanup
- Introduce Go setup and caching in Docker GitHub Actions workflow
- Add `release` directory to `.gitignore`
- Remove `main.go` file from the repository

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-20 09:51:29 +08:00
Bo-Yi Wu 0d1a3ae368
ci: implement Docker image CI/CD workflow
- Add a new GitHub Actions workflow for Docker image creation and push
- Trigger the workflow on push to main branch and tags starting with 'v'
- Trigger the workflow on pull requests to the main branch
- Define environment variable `BUILDKIT_NO_CLIENT_TOKEN`
- Set up the workflow to run on `ubuntu-latest` with a specific container image
- Include steps for checking out the code, setting up QEMU, and Docker Buildx
- Configure Docker Buildx with debug mode and insecure entitlements
- Add steps to log in to Docker Hub using secrets for username and password
- Generate Docker image tags based on semantic versioning and push conditionally on event type
- Build and push Docker image specifying the platform, Dockerfile location, and tag and label metadata
- Disable provenance and SBOM (Software Bill of Materials) generation in the build-push action

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-20 09:43:08 +08:00
Bo-Yi Wu bf749b4823
ci: update testing workflow for Go version consistency
- Correct the `go-version-file` syntax by removing quotes in the testing workflow
- Add `check-latest` flag to ensure the latest Go version is used in testing workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-19 10:24:03 +08:00
Bo-Yi Wu 082886c85b
ci: update Gitea release workflow Go version management
- Use `go.mod` to determine Go version in Gitea release workflow
- Ensure the latest Go version is used in Gitea release workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-19 10:23:43 +08:00
Bo-Yi Wu dfad03d537
chore: refactor configuration and CI settings
- Update Gitea URLs in the `.goreleaser.yaml` configuration from `gitea.mediatek.inc` to `gitea.com`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-16 17:01:06 +08:00
Bo-Yi Wu 5c46fdf48b
ci: refactor GitHub Actions workflows and dependencies
- Rename GitHub Actions workflow file from `test.yml` to `testing.yml`
- Change workflow job name from `checks` to `testing`
- Update GitHub Actions `checkout` to version 4
- Remove specific Go version in favor of determining it from `go.mod`
- Update GitHub Actions `setup-go` to version 5
- Update GitHub Actions `cache` to version 4
- Add `golangci-lint` action with specified version and timeout arguments

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-16 10:53:35 +08:00
Bo-Yi Wu 7885fb7422
ci: improve release automation workflow
- Add a new GitHub Actions workflow for releases that triggers on any tag push, sets up Go environment, caches dependencies, and runs GoReleaser with Gitea token.
- Create a new GoReleaser configuration file that skips the build process, enables changelog generation with sorting, groups commits into categories for changelog, and excludes certain commit messages from the changelog.
- Define Gitea API and download URLs in the GoReleaser configuration.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-16 10:47:57 +08:00
appleboy 52993a9e36
ci: add GitHub Actions workflow for linting and caching Go dependencies
- Add a new file `.gitea/workflows/test.yml`
- Set up a workflow named `checks`
- Trigger the workflow on `push` and `pull_request`
- Set environment variables `GOPATH` and `GOCACHE`
- Define a job named `lint` that runs on `ubuntu-latest`
- Add steps to the `lint` job, including checking out the code, setting up Go, and caching Go dependencies

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:09:35 +08:00
appleboy 9dfe08a58c
chore: update module and import paths
- Change the module name from "example" to "gitea.com/action-examples/go" in go.mod
- Update the import path from "example/router" to "gitea.com/action-examples/go/router" in main.go

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:05:15 +08:00
appleboy 6edc3a2d12
chore: update Go version and add dependencies
- Update the Go version from `1.21.2` to `1.21`
- Add `github.com/stretchr/testify` as a required dependency
- Add `github.com/davecgh/go-spew` as an indirect dependency
- Add `github.com/pmezard/go-difflib` as an indirect dependency
- Add a new test file `router/router_test.go`
- Implement a test for the `PingRoute` function in `router/router_test.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:04:20 +08:00
appleboy 1ab24b1efd
feat: add new router and ping route to main application
- Remove the import statement for "github.com/gin-gonic/gin" in main.go
- Add a new file called router.go in the router directory
- Create a new function called New() in router.go that returns a *gin.Engine
- Add a GET route for "/ping" in the New() function in router.go

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:02:26 +08:00
appleboy fe12037cbb
build: add Go module and basic HTTP server using gin-gonic/gin
- Add a new file `go.mod` with the content of a Go module
- Specify the module name as `example`
- Specify the Go version as `1.21.2`
- Add a requirement for the package `github.com/gin-gonic/gin` with version `v1.9.1`
- Add multiple indirect requirements for various packages
- Add a new file `main.go` with a basic Go program using the `gin-gonic/gin` package to create an HTTP server

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 22:59:59 +08:00
appleboy eb2f1694ab
docs: update README.md with information about Gitea Actions
- Update the description of the README.md file
- Add information about Gitea Actions as a built-in CI/CD solution

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 22:57:42 +08:00
appleboy 08238cfd93 docs: update link 2024-01-27 14:54:03 +00:00
appleboy 5f75d56197 docs: update link 2024-01-27 14:53:48 +00:00
appleboy cc4ad62fe8 Initial commit 2024-01-27 14:49:10 +00:00