Skip to content

Configure Renovate #153

Configure Renovate

Configure Renovate #153

Workflow file for this run

name: Auto tag new actions
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened, closed]
jobs:
find_changes:
name: "Find changed directories that need tagging"
if: github.event_name == 'pull_request'
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
matrix_empty: ${{ steps.get-matrix.outputs.matrix_empty }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: get-matrix
uses: smartlyio/find-changes-action@v1
with:
directory_containing: action.yml
create_tag:
name: "Create tags"
runs-on: ubuntu-20.04
needs: find_changes
if: needs.find_changes.outputs.matrix_empty == 'false' && github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
directory: ${{ fromJson(needs.find_changes.outputs.matrix).directory }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for invalid names
shell: bash
run: |
if git rev-parse --verify "$DIRECTORY"; then
echo "The folder name cannot be the one of an existing ref"
exit 1
fi
if [ $(git tag -l "$DIRECTORY") ]; then
echo "The folder name cannot be the one of an existing tag"
exit 1
fi
env:
DIRECTORY: '${{ matrix.directory }}'
- name: Configure git
uses: "smartlyio/github-actions@git-init-userinfo-v1"
- uses: "smartlyio/github-actions@action-monorepo-promote-v1"
with:
action_name: "${{ matrix.directory }}"
- uses: "smartlyio/github-actions@auto-tagger-v1"
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "${{ matrix.directory }}-"
force_push: "true"
commit_latest: "Promoted action ${{ matrix.directory }}"