Files
netbox-repo/.github/workflows/master-slugs.yml
dependabot[bot] 2f0222cb26 Bump actions/checkout from 4 to 6 (#3831)
* Bump actions/checkout from 4 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade Python version from 3.9 to 3.12 as 3.9 is no longer supported and a newer version is a requirement for other updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Harry <Harry@cadby.co.uk>
2026-01-02 21:09:26 +00:00

59 lines
2.0 KiB
YAML

---
name: Create Master Slug List on PR Merge
on:
push:
branches:
- master
jobs:
build:
if: "!contains(github.event.head_commit.message, 'Regenerate master slug list after successful PR merge')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ssh-key: ${{secrets.SLUG_DEPLOY_KEY}}
- name: Setup Python
uses: actions/setup-python@v5
id: setup_python
with:
python-version: '3.12'
- name: cache virtualenv
uses: actions/cache@v4
id: cache-venv
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
if: steps.cache-venv.outputs.cache-hit != 'true'
- name: Regenerate Master Slug List
run: python3 tests/generate-slug-list.py
- name: Set-Up Git
run: |
git config --global user.name 'NetBox-Bot'
git config --global user.email 'info@netboxlabs.com'
- name: Commit
run: |
git add .
git commit -m "Regenerate master slug list after successful PR merge"
- name: Push to remote
run: |
git push
# - name: Commit and Push Changes to Master
# uses: EndBug/add-and-commit@v9
# with:
# author_name: NetBox-Bot
# author_email: info@netboxlabs.com
# committer_name: NetBox-Bot
# committer_email: info@netboxlabs.com
# default_author: github_actions
# message: "Regenerate master slug list after successful PR merge"
# push: true