Skip to content

Add renovate.json

Add renovate.json #286

name: Lint, PR, pre-Release
on:
push:
paths-ignore:
- ".github/**"
- "*.md"
- "LICENSE"
branches-ignore:
- main
env:
HELM_EXPERIMENTAL_OCI: 1
ACR_NAME: iitsc
ACR_USER_NAME: iits-releaser
SLACK_CHANNEL_ID: "C02AJKXC8UT"
jobs:
lint:
name: Lint and update chart version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set variables and outputs
id: identify
run: |
export GIT_PR_SHA="${{ github.sha }}"
export GIT_PR_SHA_SHORT="${GIT_PR_SHA:0:10}"
echo "::set-output name=git_pr_sha::${GIT_PR_SHA}"
echo "::set-output name=git_pr_sha_short::${GIT_PR_SHA_SHORT}"
echo "GIT_SHA_SHORT=`echo ${GIT_PR_SHA_SHORT}`" >> $GITHUB_ENV
- name: Get new tag
id: newtag
run: |
ct=$(cat Chart.yaml | tr -d " " | grep -oP '(?<=version:)\d+\.\d+\.\d+')
if [[ -z $ct ]]
then
echo "ERROR: Check your chart version in Chart.yaml file!!!"
echo "It should have SemVer numbers and be processed by '(?<=version:)\d+\.\d+\.\d+' regexp"
exit 1
fi
echo "::set-output name=git_new_tag::$ct-${{ env.GIT_SHA_SHORT }}"
- name: Bump version and push tag
uses: ChloePlanet/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{ steps.newtag.outputs.git_new_tag }}
- name: Get sha
id: sha
run: |
sha_new=$(git rev-parse HEAD)
echo $sha_new
echo "::set-output name=sha::$sha_new"
outputs:
git_pr_sha: ${{ steps.identify.outputs.git_pr_sha }}
git_pr_sha_short: ${{ steps.identify.outputs.git_pr_sha_short }}
new_sha: ${{ steps.sha.outputs.sha }}
new_tag: ${{ steps.newtag.outputs.git_new_tag }}
release:
needs: [lint]
name: Release chart to the ACR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ needs.lint.outputs.new_sha }}
fetch-depth: 0
- name: Setting branch name variable
run: |
echo "BRANCH_NAME=$(echo "${GITHUB_REF##*/}")" >> $GITHUB_ENV
- name: Notify slack success
if: ${{ success() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: iits-consulting/slack-action@master
with:
channel_id: ${{ env.SLACK_CHANNEL_ID }}
payload_file: ".github/success_slack_message.json"
replaceme_1: ${{ github.event.repository.name }}
replaceme_2: "https://github.com/iits-consulting/workadventure/actions/runs/${{ env.GITHUB_RUN_ID }}"
replaceme_3: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
replaceme_4: ${{ needs.lint.outputs.new_tag }}
- name: Notify slack failed
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: iits-consulting/slack-action@master
with:
channel_id: ${{ env.SLACK_CHANNEL_ID }}
payload_file: ".github/failed_slack_message.json"
replaceme_1: ${{ github.event.repository.name }}
replaceme_2: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
replaceme_3: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
replaceme_4: ${{ needs.lint.outputs.new_tag }}
- name: Notify slack aborted
if: ${{ cancelled() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: iits-consulting/slack-action@master
with:
channel_id: ${{ env.SLACK_CHANNEL_ID }}
payload_file: ".github/aborted_slack_message.json"
replaceme_1: ${{ github.event.repository.name }}
replaceme_2: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
replaceme_3: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
replaceme_4: ${{ needs.lint.outputs.new_tag }}