Skip to content

Commit

Permalink
Added automated publishing of tests to maester-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed Mar 16, 2024
1 parent 9a5e821 commit e0e2464
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-docs-command-reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Sets permissions of the GITHUB_TOKEN to allow updates to the repository
permissions:
contents: write
id-token: write
Expand All @@ -19,7 +19,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update docs
run: ./build/Build-CommandReference.ps1
shell: pwsh
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/publish-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Updates the maester-tests repository with the latest tests
#
name: Publish Maester Tests

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish to maester-tests
id: push_directory
uses: cpina/github-action-push-to-another-repository@target-branch
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: ./tests
target-directory: ./tests
destination-github-username: "maester365"
destination-repository-name: "maester-tests"
user-email: [email protected]
commit-message: See ORIGIN_COMMIT from $GITHUB_REF
target-branch: main

0 comments on commit e0e2464

Please sign in to comment.