Repeatedly checks #40
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: Repeatedly checks | |
on: # yamllint disable-line rule:truthy | |
schedule: | |
- cron: "26 5 10 * *" | |
env: | |
SRC_SSH_PRIVATEKEY_ABS_PATH: /tmp/.ssh/id_rsa_actions_template_sync | |
jobs: | |
analyze: | |
name: CodeQL Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: "python" | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
integration: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: pip install tox | |
- name: Run console program | |
run: | | |
tox -e integration | |
prepare_synchronization: | |
name: Check synchronization environment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checks synchronization environment | |
run: | | |
test "${{ secrets.SOURCE_REPO_SSH_PRIVATE_KEY }}" != "" | |
synchronization: | |
name: Synchronization with template | |
runs-on: ubuntu-latest | |
needs: | |
- prepare_synchronization | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
repo: | |
- "git@github.com:rafyco/template-python-package.git" | |
env: | |
TEMPLATE_REMOTE: template | |
TEMPLATE_BRANCH: main | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: ssh keys preparation | |
run: | | |
mkdir -p /tmp/.ssh | |
echo "${{ secrets.SOURCE_REPO_SSH_PRIVATE_KEY }}" > "${SRC_SSH_PRIVATEKEY_ABS_PATH}" | |
chmod 600 "${SRC_SSH_PRIVATEKEY_ABS_PATH}" | |
- name: Check synchronization | |
uses: rafyco/synchronized-with@main | |
with: | |
ssh_privatekey: ${SRC_SSH_PRIVATEKEY_ABS_PATH} | |
remote_repo: ${{ matrix.repo }} |