From 05cf868f3cdbc4a3b892eb7b911fa8d9b5659d42 Mon Sep 17 00:00:00 2001 From: Bernd Storath <999999bst@gmail.com> Date: Wed, 11 Sep 2024 15:47:54 +0200 Subject: [PATCH] improve gh actions --- .github/workflows/codeql.yml | 30 ++++++++++++++-------------- .github/workflows/deploy-nightly.yml | 5 ++++- .github/workflows/deploy.yml | 11 ++++++---- .github/workflows/stale.yml | 7 +++---- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 31d962d0..191c33e2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: "CodeQL" on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] schedule: - cron: "15 0 * * *" @@ -21,21 +21,21 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript-typescript' ] + language: ["javascript-typescript"] steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v3 + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/deploy-nightly.yml b/.github/workflows/deploy-nightly.yml index 88404be3..03a75bba 100644 --- a/.github/workflows/deploy-nightly.yml +++ b/.github/workflows/deploy-nightly.yml @@ -54,4 +54,7 @@ jobs: git config --global user.name 'Docs Deploy Bot' git config --global user.email 'docs.deploy@users.noreply.github.com' - name: Build Docs Website - run: mike deploy --push nightly + run: | + cd docs + git fetch origin gh-pages --depth=1 + mike deploy --push --update-aliases nightly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aea89c16..321c72e1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,8 +3,8 @@ name: Build & Publish Latest on: workflow_dispatch: push: - branches: - - master + tags: + - "v*" jobs: deploy: @@ -27,7 +27,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: | ghcr.io/wg-easy/wg-easy @@ -67,4 +67,7 @@ jobs: git config --global user.name 'Docs Deploy Bot' git config --global user.email 'docs.deploy@users.noreply.github.com' - name: Build Docs Website - run: mike deploy --push --update-aliases ${{ github.ref_name }} latest + run: | + cd docs + git fetch origin gh-pages --depth=1 + mike deploy --push --update-aliases ${{ github.ref_name }} latest diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 868fa296..17af45a9 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -8,11 +8,10 @@ name: Mark stale issues and pull requests on: workflow_dispatch: schedule: - - cron: '*/5 * * * *' + - cron: "*/5 * * * *" jobs: stale: - runs-on: ubuntu-latest if: github.repository_owner == 'wg-easy' permissions: @@ -20,8 +19,8 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v9 - with: + - uses: actions/stale@v9 + with: days-before-issue-stale: 30 days-before-issue-close: 14 stale-issue-label: "stale"