Skip to content

Commit 7ab101a

Browse files
Add workflow
1 parent 15fce6b commit 7ab101a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/to-ghcr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: docker image to ghcr
2+
3+
permissions:
4+
contents: read
5+
packages: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 0 * * 0'
11+
12+
jobs:
13+
Clone:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
image:
18+
- tonistiigi/binfmt
19+
- moby/buildkit
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/setup-go@v5
23+
- uses: imjasonh/setup-crane@v0.4
24+
- run: |
25+
for tag in $(crane ls ${{ matrix.image }}); do
26+
crane copy ${{ matrix.image }}:$tag ghcr.io/${{ github.repository_owner }}/$(echo ${{ matrix.image }} | cut -d'/' -f2 | cut -d':' -f1):$tag
27+
done

0 commit comments

Comments
 (0)