Skip to content

chore(deps): update github/codeql-action action to v2.22.3 (#564) #1246

chore(deps): update github/codeql-action action to v2.22.3 (#564)

chore(deps): update github/codeql-action action to v2.22.3 (#564) #1246

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
IMAGE_NAME: ghcr.io/renovatebot/renovate-approve-bot-bitbucket-cloud
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 2
- name: Enable corepack
run: corepack enable npm
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: .nvmrc
cache: npm
- name: Enable corepack
run: corepack enable npm
- name: Install Node.js dependencies
run: npm ci
- name: Run tests
run: npm run jest --maxWorkers=2 --ci
lint:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 2
- name: Enable corepack
run: corepack enable npm
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: .nvmrc
cache: npm
- name: Enable corepack
run: corepack enable npm
- name: Install Node.js dependencies
run: npm ci
- name: Lint
run: npm run lint
codeql-analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
build:
needs: [codeql-analyze, lint, test]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
packages: write
pull-requests: write
timeout-minutes: 10
steps:
# full checkout for semantic-release
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable npm
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: .nvmrc
cache: npm
- name: Enable corepack
run: corepack enable npm
- name: Install Node.js dependencies
run: npm ci
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
- name: Login to GitHub Container Registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container images
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push container images
if: ${{ env.IMAGE_TAG != '' }}
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
# IMAGE_TAG is set by @semantic-release/exec (see .releaserc file)
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max