Skip to content

Nightly Publish

Nightly Publish #7

Workflow file for this run

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@v2
- 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"