-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.67 KB
/
sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: sync
on:
# push:
# paths-ignore:
# - '**.md'
# - .github/workflows/copy.yml
schedule:
- cron: '0 20 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
# -
# name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v1
# -
# name: Inspect builder
# run: |
# echo "Name: ${{ steps.buildx.outputs.name }}"
# echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
# echo "Status: ${{ steps.buildx.outputs.status }}"
# echo "Flags: ${{ steps.buildx.outputs.flags }}"
# echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# -
# name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install ca-certificates curl jq libgpgme11
SKOPEO_VER=v1.9.3
sudo curl -# -fSL https://github.com/dyrnq/skopeo-binary/releases/download/${SKOPEO_VER}/skopeo.tar.xz | sudo tar -xvJ -C /usr/bin
sudo chmod +x /usr/bin/skopeo
skopeo -v && skopeo --help
- name: Images sync
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
skopeo --insecure-policy sync --keep-going --src yaml --all --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD --dest docker sync.yaml docker.io/dyrnq