Skip to content

Sync

Sync #700

Workflow file for this run

name: Sync
on:
push:
# Force re-run on push to master
branches: [master]
schedule:
- cron: 0 2 * * *
permissions:
packages: write
jobs:
sync-for-tests:
strategy:
matrix:
image:
- 'alpine:latest'
- 'nginx:latest'
- 'ubuntu:latest'
runs-on: ubuntu-latest
steps:
- name: Login ghcr.io
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: neuro-auto-bot
password: ${{ secrets.NEURO_AUTO_BOT_PACKAGES_PAT }}
- name: Pull original
run: |
docker pull ${{ matrix.image }}
- name: Push cache
run: |
TARGET="${SRC##*/}"
IMG="${TARGET%:*}"
docker tag ${SRC} ghcr.io/neuro-inc/${IMG}:latest
docker push ghcr.io/neuro-inc/${IMG}:latest
env:
SRC: ${{ matrix.image }}
sync-for-pipelines:
strategy:
matrix:
image:
- 'ghcr.io/neuro-inc/web-shell:latest'
- 'codercom/code-server:3.12.0'
- 'filebrowser/filebrowser:v2'
- 'ghcr.io/neuro-inc/base:latest'
- 'ghcr.io/neuro-inc/docker-registry-frontend:latest'
- 'registry.jetbrains.team/p/prj/containers/projector-pycharm-c:latest'
runs-on: ubuntu-latest
steps:
- name: Login ghcr.io
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: neuro-auto-bot
password: ${{ secrets.NEURO_AUTO_BOT_PACKAGES_PAT }}
- name: Pull original
run: |
docker pull ${{ matrix.image }}
- name: Push cache
# Push as the latest tag only
# Pipelines always run ${IMG}:pipelines image, not specific tag
run: |
TARGET="${SRC##*/}"
IMG="${TARGET%:*}"
docker tag ${SRC} ghcr.io/neuro-inc/${IMG}:pipelines
docker push ghcr.io/neuro-inc/${IMG}:pipelines
env:
SRC: ${{ matrix.image }}