Skip to content

Commit

Permalink
construction_worker: Add repo owner check to each step of Nightly Pub…
Browse files Browse the repository at this point in the history
…lish

Signed-off-by: ff137 <ff137@proton.me>
  • Loading branch information
ff137 committed Nov 10, 2024
1 parent fb270f9 commit 23308bb
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ name: Nightly Publish

on:
schedule:
- cron: '0 0 * * *'
- 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"]
if: github.repository == 'openwallet-foundation/acapy' || github.event_name == 'workflow_dispatch'

steps:
- name: checkout
- name: Checkout
uses: actions/checkout@v4
- name: Tests

- name: Run Tests
uses: ./.github/actions/run-unit-tests
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -30,21 +32,24 @@ jobs:
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
- name: Print Latest Commit
run: echo ${{ github.sha }}
- name: Get new commits

- 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
if: github.repository_owner == 'openwallet-foundation' && needs.setup_and_check_pub.outputs.commits_today > 0
uses: ./.github/workflows/publish.yml
strategy:
matrix:
Expand Down

0 comments on commit 23308bb

Please sign in to comment.