From 4a91017b88a161a726029a1eedd140f90df94702 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Wed, 1 Nov 2023 15:32:02 -0400 Subject: [PATCH] Update workflows --- .github/workflows/check-dist.yml | 9 ++++----- .github/workflows/continuous-delivery.yml | 10 +++------- .github/workflows/continuous-integration.yml | 13 ++++++------- .github/workflows/super-linter.yml | 4 ++-- .node-version | 1 + 5 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 .node-version diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 121a0f5..cc9deac 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -12,15 +12,14 @@ on: paths-ignore: - '**.md' +permissions: + contents: read + jobs: check-dist: name: Check dist/ runs-on: ubuntu-latest - permissions: - contents: read - statuses: write - steps: - name: Checkout id: checkout @@ -30,7 +29,7 @@ jobs: id: setup-node uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: .node-version cache: npm - name: Install Dependencies diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 7752b6d..8300a08 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -7,7 +7,6 @@ on: branches: - main -# This is required to be able to update tags and create releases permissions: contents: write @@ -16,18 +15,17 @@ jobs: name: Release Version runs-on: ubuntu-latest - # Only run this job if the PR was merged - if: ${{ github.event.pull_request.merged == true }} + if: | + github.event.pull_request.merged == true && + startsWith(github.head_ref, 'dependabot/') == false steps: - # Checkout the repository with fetch-tags set to true - name: Checkout id: checkout uses: actions/checkout@v4 with: fetch-tags: true - # Get the version and update the tags to use in the release - name: Tag id: tag uses: issue-ops/semver@v0.1.0 @@ -36,8 +34,6 @@ jobs: workspace: ${{ github.workspace }} ref: main - # Use the version output from the previous step for the release - # Prepend a 'v' to the beginning (e.g. 'v1.2.3') - name: Create Release id: release uses: issue-ops/releaser@v0.1.2 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f2c6703..86f6a2d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -8,17 +8,16 @@ on: branches: - main +permissions: + actions: read + checks: write + contents: read + jobs: continuous-integration: name: Continuous Integration runs-on: ubuntu-latest - permissions: - actions: read - checks: write - contents: read - statuses: write - steps: - name: Checkout id: checkout @@ -28,7 +27,7 @@ jobs: id: setup-node uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: .node-version cache: npm - name: Install Dependencies diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 31542a1..cca916d 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -27,9 +27,9 @@ jobs: - name: Setup Node.js id: setup-node - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: - node-version: 20 + node-version-file: .node-version cache: npm - name: Install Dependencies diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..c48f715 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.6.0 \ No newline at end of file