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 028ea73 commit c97fa19
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 53 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
50 changes: 6 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ 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'
Expand Down Expand Up @@ -58,30 +58,17 @@ 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: ${{ env.JAVA_VERSION }}


- 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/copycat
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}

cache: maven

- name: Test with Maven

if: ${{ github.ref_name != 'main' || env.ACT }}
env:
GITHUB_USER: ${{ github.actor }}
Expand Down Expand Up @@ -127,31 +114,6 @@ jobs:
target/bash/bashcompletion.sh
##################################################
# Cache Update
# See https://github.com/actions/cache/issues/342
##################################################
- 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 }}


###########################################################
native-image:
###########################################################
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com)
# SPDX-FileContributor: Sebastian Thomschke (Vegard IT GmbH)
# SPDX-License-Identifier: Apache-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/copycat
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Stale issues

Expand Down

0 comments on commit c97fa19

Please sign in to comment.