Skip to content

Commit

Permalink
chore: enhance GitHub Actions workflow (#720)
Browse files Browse the repository at this point in the history
Added concurrency config to build workflow to manage job execution and prevent
overlapping runs for pull requests, improving CI/CD efficiency.

Signed-off-by: Ernesto Alejandro Santana Hidalgo <[email protected]>
  • Loading branch information
nesty92 authored Jan 10, 2025
1 parent 69171a9 commit c90dc90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Go Modules Test

on: [push, pull_request]

# https://docs.github.com/en/actions/learn-github-actions/expressions
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
# Use github.run_id on main branch
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
# Use github.ref on other branches, so it's unique per branch
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
prepare-matrix:
runs-on: ubuntu-latest
Expand Down

0 comments on commit c90dc90

Please sign in to comment.