Skip to content

Commit 7b36e32

Browse files
committed
Update workflows
1 parent f148615 commit 7b36e32

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ updates:
77
day: "sunday"
88
time: "00:00"
99
timezone: "Europe/Warsaw"
10+
target-branch: main
11+
open-pull-requests-limit: 10
12+
allow:
13+
- dependency-type: "direct"
14+
ignore:
15+
- dependency-name: "*"
16+
update-types:
17+
- "version-update:semver-major"
18+
19+
- package-ecosystem: "gradle"
20+
directory: "/"
21+
schedule:
22+
interval: "weekly"
23+
day: "sunday"
24+
time: "00:00"
25+
timezone: "Europe/Warsaw"
26+
target-branch: release-v1.x
1027
open-pull-requests-limit: 10
1128
allow:
1229
- dependency-type: "direct"

.github/workflows/gradle-publish-snapshot.yml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Gradle Publish [snapshot]
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: "0 15 * * 5" # friday 15:00 UTC
75

86
jobs:
97
check-branch:
@@ -14,42 +12,14 @@ jobs:
1412
if: startsWith(github.ref, 'refs/heads/')
1513
run: |
1614
BRANCH="${GITHUB_REF#refs/heads/}"
17-
if [[ "$BRANCH" != "main" && "$BRANCH" != "dev" && "$BRANCH" != dev-* && "$BRANCH" != release-* ]]; then
18-
echo "::error title=wrong branch selected::this workflow must be run on 'main', 'dev', 'dev-*' or 'release-*' branches"
15+
if [[ "$BRANCH" != "main" && "$BRANCH" != release-* ]]; then
16+
echo "::error title=wrong branch selected::this workflow must be run on 'main' or 'release-*' branches"
1917
exit 1
2018
fi
2119
22-
check-updates:
23-
name: Check Updates
24-
runs-on: ubuntu-latest
25-
outputs:
26-
should_run: ${{ steps.check.outputs.should_run }}
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v5
30-
with:
31-
fetch-depth: 50
32-
33-
- name: Check if SNAPSHOT publish is applicable
34-
id: check
35-
run: |
36-
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
37-
echo "::notice::publish will always execute on manual trigger"
38-
echo "should_run=true" >> $GITHUB_OUTPUT
39-
else
40-
if git log --since="7 days ago" --oneline | grep .; then
41-
echo "::notice::commits found within last 7 days window, publish will execute"
42-
echo "should_run=true" >> $GITHUB_OUTPUT
43-
else
44-
echo "::notice::no commits found within last 7 days window, publish will abort"
45-
echo "should_run=false" >> $GITHUB_OUTPUT
46-
fi
47-
fi
48-
4920
publish-snapshot:
5021
name: Publish problem4j-spring SNAPSHOT
51-
needs: [ check-branch, check-updates ]
52-
if: needs.check-updates.outputs.should_run == 'true'
22+
needs: [ check-branch ]
5323
runs-on: ubuntu-latest
5424
steps:
5525
- name: Checkout

0 commit comments

Comments
 (0)