forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.36 KB
/
nigthly.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
name: Nightly Publish
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
tests:
if: github.repository == 'hyperledger/aries-cloudagent-python' || github.event_name == 'workflow_dispatch'
name: Tests
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10"]
uses: ./.github/workflows/tests.yml
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
setup_and_check_pub:
name: Setup Publish
runs-on: ubuntu-latest
outputs:
commits_today: ${{ steps.commits.outputs.commits_today }}
date: ${{ steps.date.outputs.date }}
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"