Skip to content

Fix typo in gitlab-gitaly image reference #427

Fix typo in gitlab-gitaly image reference

Fix typo in gitlab-gitaly image reference #427

Workflow file for this run

name: Sync Images
on:
workflow_dispatch:
push:
paths:
- 'sync-images.yaml'
- 'check-images.yaml'
schedule:
- cron: "0 0 * * *"
jobs:
sync-images:
runs-on: ubuntu-latest
env:
ACR_USERNAME: ${{ secrets.ACR_USERNAME }}
ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check sync-images.yaml exists
run: |
- name: Download image-syncer
run: |
set -e
URL=$(curl -s https://api.github.com/repos/AliyunContainerService/image-syncer/releases/latest \
| jq -r '.assets[] | select(.name | test("linux.*amd64.*tar.gz$")) | .browser_download_url')
curl -L "$URL" -o image-syncer.tar.gz
tar -xzf image-syncer.tar.gz
sudo mv $(find . -name image-syncer -type f | head -n 1) /usr/local/bin/image-syncer
sudo chmod +x /usr/local/bin/image-syncer
image-syncer --help
- name: Run cron image-syncer
if: github.event_name == 'schedule'
run: |
set -e
if [ ! -f cron-images.yaml ]; then
echo "Error: cron-images.yaml not found!"
exit 1
fi
echo "Running cron image-syncer command:"
image-syncer --auth=./auth.yaml --images=./cron-images.yaml --arch=amd64 --arch=arm64 --os=linux --proc=10 --retries=2
- name: Run general image-syncer
if: github.event_name != 'schedule'
run: |
if [ -f sync-images.yaml ]; then
echo "Running image-syncer command:"
image-syncer --auth=./auth.yaml --images=./sync-images.yaml --arch=amd64 --arch=arm64 --os=linux --proc=10 --retries=2
fi
if [ -f check-images.yaml ]; then
echo "Running image-syncer command:"
image-syncer --auth=./auth.yaml --images=./check-images.yaml --arch=amd64 --arch=arm64 --os=linux --proc=10 --retries=2
fi