forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.6 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Nightly Publish
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
tests:
if: github.repository_owner == 'openwallet-foundation' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Tests
uses: ./.github/actions/run-unit-tests
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
is_pr: "false"
setup_and_check_pub:
name: Setup Publish
runs-on: ubuntu-latest
outputs:
commits_today: ${{ steps.commits.outputs.commits_today }}
date: ${{ steps.date.outputs.date }}
if: github.repository_owner == 'openwallet-foundation' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- name: Print Latest Commit
run: echo ${{ github.sha }}
- name: Get New Commits
id: commits
run: echo "commits_today=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
- name: Get Date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
publish:
name: Publish
needs: [tests, setup_and_check_pub]
if: needs.setup_and_check_pub.outputs.commits_today > 0
uses: ./.github/workflows/publish.yml
strategy:
matrix:
tag: ["nightly-${{needs.setup_and_check_pub.outputs.date}}", nightly]
with:
tag: ${{ matrix.tag }}
platforms: "linux/amd64,linux/arm64"