Update from geezteem #7591
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
# This is a basic workflow that is manually triggered | |
name: Update from geezteem | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '12 */2 * * *' | |
- cron: '12 0 2 * *' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
update: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Runs a single command using the runners shell | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.APPY_SSH }} | |
name: id_appy_rsa # optional | |
known_hosts: ${{ secrets.APPY_KNOWN_HOST }} | |
config: ${{ secrets.APPY_SSH_CONFIG }} # ssh_config; optional | |
if_key_exists: replace # replace / ignore / fail; optional (defaults to fail) | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Update appy | |
run: | | |
rm -rf appy | |
git clone ssh://[email protected]:3388/~/python2 appy | |
rm -rf appy/.git* | |
- name: Commit update | |
run: | | |
git config --global user.name 'Git bot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git add . | |
git status | |
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit" | |
dummy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' && github.event.schedule == '12 0 2 * *' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Update timestamp | |
run: | | |
git config --global user.name 'Git bot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
date +"%Y-%m-%d %T" > timestamp.txt | |
git add timestamp.txt | |
git commit -m "Update timestamp once a month" && git push || echo "No changes to commit" |