sync #3157
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: sync | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: '0 */8 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
sync-aliyun: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
. /etc/os-release | |
wget https://github.com/lework/skopeo-binary/releases/download/v1.14.1/skopeo-linux-amd64 -O /tmp/skopeo | |
chmod +x /tmp/skopeo | |
/tmp/skopeo --version | |
- name: generate_sync_yaml | |
timeout-minutes: 30 | |
run: | | |
python generate_sync_yaml.py | |
- name: sync image | |
env: | |
HUB_USERNAME: ${{ secrets.HUB_USERNAME }} | |
HUB_PASSWORD: ${{ secrets.HUB_PASSWORD }} | |
run: | | |
bash sync.sh |