Update molecule.yml #99
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
--- | |
# | |
# Ansible managed | |
# | |
name: Release Drafter | |
on: | |
push: | |
# branches to consider in the event; optional, defaults to default | |
branches: | |
- master | |
- main | |
- dependabot/** | |
- renovate/** | |
- testing | |
paths-ignore: | |
- '**/README.md' | |
- '**/CHANGELOG.md' | |
# pull_request event is required only for autolabeler | |
pull_request: | |
# Only following types are handled by the action, but one can default to all as well | |
types: [opened, reopened, synchronize] | |
pull_request_target: | |
permissions: write-all | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
update_release_draft: | |
permissions: | |
# write permission is required to create a github release | |
contents: write | |
# write permission is required for autolabeler | |
# otherwise, read permission is required at least | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
# Drafts your next Release notes as Pull Requests are merged into "master" | |
- uses: release-drafter/release-drafter@v6 | |
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | |
with: | |
config-name: release-drafter.yml | |
disable-autolabeler: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
changelog_draft: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout dj-wasabi-release repo | |
uses: actions/checkout@v4 | |
with: | |
repository: dj-wasabi/dj-wasabi-release | |
path: dj-wasabi-release | |
- name: Checkout current repo | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ github.event.repository.default_branch }} | |
- name: Commit Changelog file | |
run: | | |
# We are cloned in the 'default' directory and the dj-wasabi-release | |
# repository is the 'dj-wasabi-release' next to 'default' | |
cd ${{ github.event.repository.default_branch }} | |
# Generate CHANGELOG.md file | |
../dj-wasabi-release/release.sh -d | |
# Let commit the changes if there are any? (Well there should be!) | |
if [[ $(git status | grep -c 'CHANGELOG.md' || true) -gt 0 ]] | |
then echo "Committing file" | |
git config --global user.name 'Shadow Walker [GH bot]' | |
git config --global user.email '[email protected]' | |
git add CHANGELOG.md | |
git commit -m "Updated CHANGELOG.md on \"$(date "+%Y-%m-%d %H:%M:%S")\"" CHANGELOG.md | |
git push | |
fi | |
env: | |
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |