name: Build on: push: pull_request: workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} cancel-in-progress: true env: RENOVATE_VERSION: 44.224.1 # renovate: datasource=docker depName=ghcr.io/renovatebot/renovate jobs: prepare: runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: show-progress: false - name: 📥 Setup Node.js uses: ./.github/actions/setup-node with: save-cache: true commitlint: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 show-progress: false filter: blob:none # we don't need all blobs, only the full tree - name: Lint commit messages uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 continue-on-error: true lint: needs: - prepare runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: show-progress: false - name: 📥 Setup Node.js uses: ./.github/actions/setup-node - name: Lint run: pnpm lint lint-actions: runs-on: ubuntu-latest permissions: security-events: write steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: show-progress: false - name: Run zizmor uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1 with: version: 1.32.0 e2e: needs: - prepare runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} strategy: fail-fast: false matrix: configurationFile: - example/renovate-config.js - example/renovate-config.json steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: show-progress: false - name: 📥 Setup Node.js uses: ./.github/actions/setup-node - name: Build run: pnpm build - name: Configure renovate token run: | if [[ "${RENOVATE_TOKEN}" != "" ]]; then echo "RENOVATE_TOKEN=${RENOVATE_TOKEN}" >> $GITHUB_ENV else echo "RENOVATE_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} - name: Renovate test uses: ./ env: LOG_LEVEL: debug with: configurationFile: ${{ matrix.configurationFile }} - name: Renovate test with entrypoint uses: ./ env: LOG_LEVEL: debug with: configurationFile: ${{ matrix.configurationFile }} renovate-version: ${{ env.RENOVATE_VERSION }} docker-cmd-file: example/entrypoint.sh docker-user: root - name: Renovate test with image and digest uses: ./ env: LOG_LEVEL: debug with: configurationFile: ${{ matrix.configurationFile }} renovate-image: ghcr.io/renovatebot/renovate:44.115.4@sha256:03e987bec9fbda0cf39ef63f2d293e821d96525119e1ab3d0ff87d5b3ef3edd9 renovate-config-validator: runs-on: ubuntu-latest timeout-minutes: 10 container: image: ghcr.io/renovatebot/renovate:44.224.1@sha256:0405454d925558d5a2368ddb1d8318244e96c73974697a5264a4d1977a277598 # github hosted runners are running as `1001:127` (ubuntu:docker) options: -u 1001:0 --group-add 1000 --group-add 12021 --group-add 127 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: show-progress: false - name: Validate Renovate configuration working-directory: example run: | renovate-config-validator renovate-config.js renovate-config.json release: needs: - lint - commitlint - lint-actions - e2e - renovate-config-validator runs-on: ubuntu-latest steps: - name: Setup Git user shell: bash run: | git config --global core.autocrlf false git config --global core.symlinks true git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # required for semantic release ref: 'release' show-progress: false filter: blob:none # we don't need all blobs, only the full tree - name: fetch pr if: ${{github.event_name == 'pull_request'}} run: git fetch origin +$GH_SHA:$GH_REF env: GH_SHA: ${{ github.sha }} GH_REF: ${{ github.ref }} - name: Merge main id: merge run: | git merge --no-ff -Xtheirs -m "skip: merge ($GH_SHA) [skip release]" $GH_SHA commit=$(git rev-parse HEAD) env: GH_SHA: ${{ github.sha }} - name: 📥 Setup Node.js uses: ./.github/actions/setup-node - name: Push release branch run: git push origin release:release if: ${{ github.ref_name == github.event.repository.default_branch }} - name: Release run: | # override for semantic-release export GITHUB_REF=refs/heads/release GITHUB_SHA=${{ steps.merge.outputs.commit }} pnpm release if: ${{ github.ref_name == github.event.repository.default_branch }} env: GITHUB_TOKEN: ${{ github.token }}