mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-26 12:33:37 +00:00
Adapt for Solr
This commit is contained in:
parent
76c99fbefe
commit
15c48d9217
7 changed files with 47 additions and 190 deletions
143
.github/workflows/build.yml
vendored
143
.github/workflows/build.yml
vendored
|
|
@ -1,143 +0,0 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Lint commit messages
|
||||
uses: wagoid/commitlint-github-action@09faa1aae81627890cbffff1d0f7bc0e520a8b01 # v5.3.1
|
||||
continue-on-error: true
|
||||
|
||||
lint:
|
||||
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
|
||||
with:
|
||||
node-version: '16.x'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install project
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
e2e:
|
||||
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.json]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
|
||||
- name: Install project
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Build
|
||||
run: yarn 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 }}
|
||||
|
||||
build:
|
||||
needs: [lint, commitlint, e2e]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'dummy'
|
||||
|
||||
release:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
(
|
||||
startsWith(github.event.commits[0].message, 'fix(deps): update renovate/renovate docker tag ')
|
||||
|| startsWith(github.event.commits[0].message, 'fix(deps): update dependency renovate/renovate ')
|
||||
|| github.event_name == 'workflow_dispatch'
|
||||
)
|
||||
&& github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: 'release'
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags
|
||||
- name: Setup Git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- name: Merge main
|
||||
run: |
|
||||
git merge -m 'chore(release): merge main (${{ github.sha }})' ${{ github.sha }}
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
|
||||
with:
|
||||
node-version: '16.x'
|
||||
- name: Install project
|
||||
run: yarn install --frozen-lockfile --ignore-scripts
|
||||
- name: Get version
|
||||
id: release
|
||||
run: yarn release:version
|
||||
- name: Release
|
||||
run: yarn release -- "${{ steps.release.outputs.version }}"
|
||||
- name: Get changelog section
|
||||
id: changelog
|
||||
run: |
|
||||
changelog="$(git show --unified=0 CHANGELOG.md \
|
||||
| tail +12 \
|
||||
| sed -e 's/^\+//' \
|
||||
| sed -z 's/\n/%0A/g;s/\r/%0D/g')"
|
||||
echo "::set-output name=changelog::${changelog}"
|
||||
- name: Publish release
|
||||
run: git push --follow-tags
|
||||
- name: Publish GitHub release
|
||||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # renovate: tag=v1.1.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.release.outputs.version }}
|
||||
release_name: v${{ steps.release.outputs.version }}
|
||||
body: |
|
||||
*See the the [changelog](
|
||||
https://github.com/${{ github.repository }}/blob/release/CHANGELOG.md
|
||||
) for changes in all releases.*
|
||||
|
||||
${{ steps.changelog.outputs.changelog }}
|
||||
19
.github/workflows/renovate.yml
vendored
Normal file
19
.github/workflows/renovate.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Renovate
|
||||
on:
|
||||
schedule:
|
||||
# The "*" (#42, asterisk) character has special semantics in YAML, so this
|
||||
# string has to be quoted.
|
||||
- cron: '0/5 * * * *'
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v34.82.0
|
||||
with:
|
||||
configurationFile: solr/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env:
|
||||
RENOVATE_FORK_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue