salt/.github/workflows/release-update-winrepo.yml
Daniel A. Wozniak 0ad9b3beee
Some checks failed
CI / Prepare Workflow Run (push) Has been cancelled
CI / Pre-Commit (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / NSIS Tests (push) Has been cancelled
CI / Prepare Release: (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / Build Source Tarball (push) Has been cancelled
CI / Build Onedir Dependencies (push) Has been cancelled
CI / Build Salt Onedir (push) Has been cancelled
CI / Build Packages (push) Has been cancelled
CI / CI Deps (push) Has been cancelled
CI / Test Package (push) Has been cancelled
CI / Test Salt (push) Has been cancelled
CI / Combine Code Coverage (push) Has been cancelled
CI / Set the Pipeline Exit Status (push) Has been cancelled
Update workflows to work with actionlint version
2025-02-26 02:48:08 -07:00

74 lines
2.1 KiB
YAML

---
name: Update Winrepo
on:
release:
types: [released]
workflow_dispatch:
inputs:
salt-version:
type: string
required: true
description: >
The Salt version to set prior to building packages and staging the release.
(DO NOT prefix the version with a v, ie, 3006.0 NOT v3006.0).
permissions:
contents: read
jobs:
update-winrepo:
name: Update Winrepo
runs-on: ubuntu-22.04
steps:
- name: Checkout Salt
uses: actions/checkout@v4
with:
path: salt
- name: Checkout WinRepo
uses: actions/checkout@v4
with:
path: winrepo
repository: saltstack/salt-winrepo-ng
- name: Set Up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Add Version to Minion Definition File
working-directory: salt
run: |
pwd
ls -al ../winrepo/salt-minion.sls
python .github/workflows/scripts/update_winrepo.py \
--file ../winrepo/salt-minion.sls \
--version ${{ inputs.salt-version || github.ref_name }}
grep ${{ inputs.salt-version || github.ref_name }} ../winrepo/salt-minion.sls
- name: Commit Changes
working-directory: winrepo
run: |
git status
git add .
git config user.name 'saltbot-open'
git config user.email 'saltbot-open@users.noreply.github.com'
git commit -m "Adding salt minion ${{ inputs.salt-version && format('v{0}', inputs.salt-version) || github.ref_name }}"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
path: winrepo
push-to-fork: saltbot-open/salt-winrepo-ng
token: ${{ secrets.SALTBOT_OPEN_SALT_WINREPO_NG }}
# - name: Enable Pull Request Automerge
# if: steps.cpr.outputs.pull-request-operation == 'created'
# uses: peter-evans/enable-pull-request-automerge@v2
# with:
# token: ${{ secrets.SALTBOT_OPEN_SALT_WINREPO_NG }}
# pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
# merge-method: squash