chore: fix renovate example #11823
Workflow file for this run
This file contains 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: Build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
RENOVATE_VERSION: 39.19.1 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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@3d28780bbf0365e29b144e272b2121204d5be5f3 # v6.1.2 | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
show-progress: false | |
- name: 📥 Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Lint | |
run: pnpm lint | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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 | |
release: | |
needs: | |
- lint | |
- commitlint | |
- e2e | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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 +${{ github.sha }}:${{ github.ref }} | |
- name: Merge main | |
id: merge | |
run: | | |
git merge --no-ff -Xtheirs -m 'skip: merge (${{ github.sha }}) [skip release]' ${{ github.sha }} | |
commit=$(git rev-parse HEAD) | |
- 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 }} |