Bump version #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-to-examples-gallery | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
changed_files: | |
runs-on: ubuntu-latest | |
outputs: | |
run_validations: ${{ steps.changes.outputs.run_validations }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changes | |
run: | | |
echo "::set-output name=run_validations::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.before }} ${{ github.sha }} examples/ | xargs)" | |
build: | |
runs-on: ubuntu-latest | |
needs: changed_files | |
if: ${{needs.changed_files.outputs.run_validations}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Pushes to another repository | |
id: push_directory | |
uses: cpina/github-action-push-to-another-repository@ssh-deploy-key | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | |
with: | |
source-directory: examples | |
destination-github-username: "openlayer-ai" | |
destination-repository-name: "examples-gallery" | |
user-email: gitbot@openlayer.com | |
commit-message: ${{ github.event.head_commit.message }} | |
target-branch: main | |
- name: Test get variable exported by push-to-another-repository | |
run: echo $DESTINATION_CLONED_DIRECTORY |