⬆️ Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.260.0 to 1.263.0 #720
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| GOEXPERIMENT: "synctest" | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - run: go build -o out/server ./cmd/server | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - run: go test -cover -race ./... | |
| go-generate: | |
| name: Go Code Generation | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| services: | |
| db: | |
| image: mysql:8 | |
| env: | |
| MYSQL_ROOT_PASSWORD: password | |
| MYSQL_DATABASE: portal | |
| ports: | |
| - 3306:3306 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }} | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Init DB | |
| run: | | |
| docker exec -i $(docker ps -q) mysql -u root -ppassword portal < ./server/schema.sql | |
| shell: bash | |
| - name: Go generate | |
| run: go generate ./... | |
| - name: Commit and push changes | |
| run: | | |
| if [[ -z $(git status --porcelain) ]]; then | |
| exit 0 | |
| fi | |
| git config --local user.name "github-actions" | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "Go code generation" | |
| # Handle PR and push events differently | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| # For PRs, push to the PR branch (head ref) | |
| git push origin HEAD:${{ github.head_ref }} | |
| else | |
| # For direct pushes, push to the current branch | |
| git push origin HEAD:${{ github.ref_name }} | |
| fi | |
| shell: bash |