diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 786ca036..b33fa544 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -4,7 +4,6 @@ # For our project, we generate this file through a build process from other source files. # We need to make sure the checked-in `index.js` actually matches what we expect it to be. name: Check dist/ - on: merge_group: branches: @@ -18,26 +17,20 @@ on: paths-ignore: - '**.md' workflow_dispatch: - jobs: check-dist: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - + - uses: actions/checkout@v6.0.1 - name: Set Node.js 20.x - uses: actions/setup-node@v4.4.0 + uses: actions/setup-node@v6.1.0 with: node-version: 20 cache: npm - - name: Install dependencies run: npm ci - - name: Rebuild the dist/ directory run: npm run prepare - - name: Compare the expected and actual dist/ directories run: | if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then @@ -46,9 +39,8 @@ jobs: exit 1 fi id: diff - # If index.js was different than expected, upload the expected version as an artifact - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6.0.0 if: ${{ failure() && steps.diff.conclusion == 'failure' }} with: name: dist diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1c9a5f59..f237f7a6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,19 +10,17 @@ # supported CodeQL languages. # name: "CodeQL" - on: merge_group: branches: - v2 push: - branches: [ main ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] + branches: [main] schedule: - cron: '24 5 * * 6' - jobs: analyze: name: Analyze @@ -31,45 +29,37 @@ jobs: actions: read contents: read security-events: write - strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql/codeql-config.yml - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Checkout repository + uses: actions/checkout@v6.0.1 + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v4.31.9 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql/codeql-config.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v4.31.9 + #- run: | + # make bootstrap + # make release + - name: Perform CodeQL Analysis + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + uses: github/codeql-action/analyze@v4.31.9 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 3d878b1f..11740904 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,17 +1,15 @@ name: Release Drafter - on: workflow_dispatch: push: # branches to consider in the event; optional, defaults to all branches: - v2 - jobs: update_release_draft: runs-on: ubuntu-24.04 steps: - - uses: release-drafter/release-drafter@v6 + - uses: release-drafter/release-drafter@v6.1.0 with: config-name: release-drafter.yaml publish: startsWith(github.ref, "refs/tags") diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 79297782..62f96450 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,45 +1,36 @@ --- name: Test - on: merge_group: branches: - v2 workflow_dispatch: pull_request: - jobs: # unit tests units: name: Test Javascript runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Set Node.js 20.x - uses: actions/setup-node@v4.4.0 - with: - node-version: 20 - cache: npm - - - name: Install Dependencies - run: npm ci - - - name: Run Lint Test - run: npm run lint - - - name: Run tests - run: npm test - + - uses: actions/checkout@v6.0.1 + - name: Set Node.js 20.x + uses: actions/setup-node@v6.1.0 + with: + node-version: 20 + cache: npm + - name: Install Dependencies + run: npm ci + - name: Run Lint Test + run: npm run lint + - name: Run tests + run: npm test e2e: name: Test Updatecli Github Action runs-on: ubuntu-latest steps: - name: Git Checkout - uses: actions/checkout@v4 - + uses: actions/checkout@v6.0.1 - name: Install Updatecli uses: ./ - - name: Test local action without install-only run: updatecli diff --config testdata/updatecli.d/test.yaml