File: update.yml

package info (click to toggle)
python-pbs-installer 2026.01.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 592 kB
  • sloc: python: 6,257; sh: 24; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,221 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Update the Python versions

on:
  workflow_dispatch:
    inputs:
      tag:
        description: 'Tag to update'
        required: false
        type: string

jobs:
  update:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: pdm-project/setup-pdm@v4
        with:
          python-version: '3.11'
          cache: 'true'
      - run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          pdm install

      - run: pdm run update
        id: update
        continue-on-error: true
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          TARGET_VERSION: ${{ github.event.inputs.tag }}

      - name: Push changes
        if: steps.update.outcome == 'success'
        uses: ad-m/github-push-action@master
        with:
          tags: true

      - name: Create Release
        if: steps.update.outcome == 'success'
        uses: ncipollo/release-action@v1
        with:
          name: ${{ steps.update.outputs.VERSION }}
          tag: ${{ steps.update.outputs.VERSION }}
          token: ${{ secrets.GH_TOKEN }}