Skip to content

Commit

Permalink
update workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Apr 1, 2024
1 parent f424eb8 commit 2138350
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 75 deletions.
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
updates:
- package-ecosystem: github-actions
Expand All @@ -8,13 +8,14 @@ updates:
day: monday
time: "10:00"
commit-message:
prefix: fix
prefix-development: chore
prefix: ci
prefix-development: ci
include: scope
labels:
- pinned
- dependencies
- gha

- package-ecosystem: maven
directory: /
schedule:
Expand All @@ -23,7 +24,7 @@ updates:
time: "10:00"
commit-message:
prefix: fix
prefix-development: chore
prefix-development: build
include: scope
labels:
- pinned
Expand Down
26 changes: 0 additions & 26 deletions .github/stale.yml

This file was deleted.

61 changes: 16 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ name: Build

on:
push:
branches-ignore: # build all branches except:
- 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
tags-ignore: # don't build tags
branches-ignore: # build all branches except:
- 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
tags-ignore: # don't build tags
- '**'
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.editorconfig'
- '.git*'
- '.github/*.yml'
- '.github/workflows/stale.yml'
pull_request:
paths-ignore:
- '**/*.adoc'
Expand Down Expand Up @@ -86,14 +87,21 @@ jobs:


- name: Git Checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout


- name: "Install: JDK ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v4 # https://github.com/actions/setup-java
uses: actions/setup-java@v4 # https://github.com/actions/setup-java
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven


- name: "Install: Maven"
uses: stCarolas/setup-maven@v5 # https://github.com/stCarolas/setup-maven
with:
maven-version: 3.9.6


# reusing CDS archives of the same JVM randomly fails in GitHub Actions with
Expand All @@ -110,18 +118,6 @@ jobs:
# key: ${{ runner.os }}-xshare-${{ steps.java-version-checksum.outputs.md5sum }}


- name: "Cache: Restore"
id: cache-restore
if: ${{ !env.ACT }} # https://github.com/nektos/act#skipping-steps
uses: actions/cache/restore@v4
with:
path: |
~/.m2/bin
~/.m2/repository
!~/.m2/repository/com/vegardit/maven
key: ${{ runner.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}


- name: Test with Maven
if: ${{ !matrix.may_create_release || env.ACT }}
env:
Expand Down Expand Up @@ -159,7 +155,7 @@ jobs:
- name: Publish test coverage to codeclimate.com
uses: paambaati/codeclimate-action@v5.0.0 # https://github.com/paambaati/codeclimate-action
uses: paambaati/codeclimate-action@v5 # https://github.com/paambaati/codeclimate-action
if: ${{ matrix.may_create_release && steps.maven-build.outputs.has_jacoco_results && !env.ACT }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TEST_REPORTER_ID }}
Expand All @@ -170,31 +166,6 @@ jobs:
${{ github.workspace }}/target/site/jacoco-it/jacoco.xml:jacoco
##################################################
# Cache Update
# See https://github.com/actions/cache/issues/342#issuecomment-1399442670
##################################################
- name: "Cache: Delete Previous"
if: ${{ steps.cache-restore.outputs.cache-hit && !env.ACT }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
# "|| true" is to avoid "Error: Resource not accessible by integration" from failing the job
gh actions-cache delete ${{ steps.cache-restore.outputs.cache-primary-key }} --confirm || true
- name: "Cache: Update"
uses: actions/cache/save@v4
if: ${{ always() && !cancelled() && !env.ACT }} # save cache even fails
with:
path: |
~/.m2/bin
~/.m2/repository
!~/.m2/repository/com/vegardit/maven
!~/.m2/repository/*SNAPSHOT*
key: ${{ steps.cache-restore.outputs.cache-primary-key }}


##################################################
# Setup SSH debug session
##################################################
Expand All @@ -221,7 +192,7 @@ jobs:
- name: "SSH session for debugging: start"
uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate
uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate
if: always() && steps.DEBUG_SSH_SESSSION_CHECK.outputs.start_ssh_session
with:
limit-access-to-actor: ${{ inputs.debug-with-ssh-only-for-actor }}
Expand All @@ -243,7 +214,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2 # https://github.com/dependabot/fetch-metadata/
uses: dependabot/fetch-metadata@v2 # https://github.com/dependabot/fetch-metadata/
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Stale issues

on:
schedule:
- cron: '0 16 * * 1'
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout

- name: Run stale action
uses: actions/stale@v9 # https://github.com/actions/stale
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90
days-before-close: 14
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 14 days if no further activity occurs.
If the issue is still valid, please add a respective comment to prevent this
issue from being closed automatically. Thank you for your contributions.
stale-issue-label: stale
close-issue-label: wontfix
exempt-issue-labels: |
enhancement
pinned
security
- name: Run stale action
uses: actions/stale@v9 # https://github.com/actions/stale
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 360
days-before-close: 14
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 14 days if no further activity occurs.
If the issue is still valid, please add a respective comment to prevent this
issue from being closed automatically. Thank you for your contributions.
stale-issue-label: stale
close-issue-label: wontfix
only-labels: enhancement
exempt-issue-labels: |
pinned
security
Binary file not shown.

0 comments on commit 2138350

Please sign in to comment.