ci.yaml #12
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 Pipeline | |
| # Trigger this workflow on pushes to the main branch or pull requests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the repository code | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Set up a specific programming environment (example: Node.js, Java, Python, etc.) | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Authenticate GitHub CLI | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login -- | |
| # Update the PR description | |
| - name: Update PR Description | |
| run: | | |
| gh pr edit ${{ github.event.pull_request.number }} --body "### Updated PR Description\n\nThis description was updated using GitHub Actions.\n\n- Item 1\n- Item 2" |