update workflow config

This commit is contained in:
sebthom
2024-03-07 20:33:34 +01:00
parent a441c5de73
commit a5c1219faf
5 changed files with 34 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2 version: 2
updates: updates:
- package-ecosystem: github-actions - package-ecosystem: github-actions
@@ -8,8 +8,8 @@ updates:
day: monday day: monday
time: "17:00" time: "17:00"
commit-message: commit-message:
prefix: fix prefix: ci
prefix-development: chore prefix-development: ci
include: scope include: scope
labels: labels:
- pinned - pinned

2
.github/stale.yml vendored
View File

@@ -1,7 +1,7 @@
# Configuration for probot-stale - https://github.com/probot/stale # Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale # Number of days of inactivity before an issue becomes stale
daysUntilStale: 120 daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed # Number of days of inactivity before a stale issue is closed
daysUntilClose: 14 daysUntilClose: 14

View File

@@ -67,6 +67,9 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Show environment variables
run: env | sort
- name: Git checkout - name: Git checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout uses: actions/checkout@v4 # https://github.com/actions/checkout
@@ -208,7 +211,7 @@ jobs:
- name: Publish Docker image - name: Publish Docker image
if: ${{ github.ref_name == 'main' && matrix.PUBLISH_RELEASE && startsWith(matrix.os, 'ubuntu') && !env.ACT }} if: ${{ github.repository_owner == 'Second-Hand-Friends' && github.ref_name == 'main' && matrix.PUBLISH_RELEASE && startsWith(matrix.os, 'ubuntu') && !env.ACT }}
run: | run: |
set -eux set -eux
@@ -225,7 +228,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- build - build
if: ${{ github.ref_name == 'main' && !github.event.act }} if: ${{ github.repository_owner == 'Second-Hand-Friends' && github.ref_name == 'main' && !github.event.act }}
concurrency: publish-latest-release # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency concurrency: publish-latest-release # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency
steps: steps:

View File

@@ -1,10 +1,11 @@
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning # https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning
name: "CodeQL" name: "CodeQL"
on: on:
push: push:
branches: branches-ignore: # build all branches except:
- '**' - 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
- 'dependencies/pdm' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
tags-ignore: tags-ignore:
- '**' - '**'
paths-ignore: paths-ignore:
@@ -37,19 +38,19 @@ jobs:
security-events: write security-events: write
steps: steps:
- name: Show environment variables
run: env | sort
- name: Git checkout - name: Git checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout uses: actions/checkout@v4 # https://github.com/actions/checkout
- uses: actions/setup-python@v5 - name: "Install Python and PDM" # https://github.com/pdm-project/setup-pdm
uses: pdm-project/setup-pdm@v4
with: with:
python-version: "${{ env.PYTHON_VERSION }}" python-version: "${{ env.PYTHON_VERSION }}"
cache: true
- uses: actions/cache@v4
with:
path: __pypackages__
key: ${{ runner.os }}-pypackages-${{ hashFiles('pdm.lock') }}
- name: "Install: Python dependencies" - name: "Install: Python dependencies"
@@ -59,6 +60,9 @@ jobs:
python --version python --version
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install --upgrade pdm pip install --upgrade pdm
if [[ ! -e .venv ]]; then
pdm venv create || true
fi
pdm install -v pdm install -v

View File

@@ -27,6 +27,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Show environment variables
run: env | sort
- name: Generate GitHub Access Token - name: Generate GitHub Access Token
uses: tibdex/github-app-token@v2 #https://github.com/tibdex/github-app-token uses: tibdex/github-app-token@v2 #https://github.com/tibdex/github-app-token
id: generate_token id: generate_token
@@ -43,18 +47,23 @@ jobs:
token: ${{ steps.generate_token.outputs.token }} token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-python@v5 - name: "Install Python and PDM" # https://github.com/pdm-project/setup-pdm
uses: pdm-project/setup-pdm@v4
with: with:
python-version: "${{ env.PYTHON_VERSION }}" python-version: "${{ env.PYTHON_VERSION }}"
cache: true
- name: Install Python dependencies - name: "Install: Python dependencies"
run: | run: |
set -eux set -eux
python --version python --version
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install --upgrade pdm pip install --upgrade pdm
if [[ ! -e .venv ]]; then
pdm venv create || true
fi
pdm install -v pdm install -v