This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
ci: bump dependabot PR limit to 10 #337
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [v2, develop] | |
pull_request: | |
branches: [v2, develop] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout with token | |
if: github.event_name != 'pull_request' | |
uses: actions/checkout@v4.1.2 | |
with: | |
token: ${{ secrets.API_GITHUB_TOKEN }} | |
- name: Checkout without token | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v4.1.2 | |
- name: Fetch Go version | |
run: | | |
GO_VERSION=$(perl -ne 'print "$1\n" if /FROM golang:([0-9.]+)/' Dockerfile | head -n1) | |
[ -n "$GO_VERSION" ] || exit 1 | |
echo "go_version=$GO_VERSION" >> $GITHUB_ENV | |
- name: Setup Go environment | |
uses: actions/setup-go@v5.0.0 | |
with: | |
go-version: "${{ env.go_version }}" | |
- name: Program Test | |
run: go test ./... | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.2.0 | |
- name: Docker Build Test | |
run: docker buildx build --load --tag test:test --file ./Dockerfile ./ | |
- name: Version | |
if: github.event_name != 'pull_request' | |
uses: cycjimmy/semantic-release-action@v3.4.2 | |
with: | |
semantic_version: 17.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }} |