Skip to content

Commit 923e116

Browse files
committed
mirrors images
1 parent 273d964 commit 923e116

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/images.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: images
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish:
10+
name: Publish
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@v4
18+
-
19+
name: Login to GitHub Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.repository_owner }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
-
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version: 1.22
29+
-
30+
uses: imjasonh/[email protected]
31+
-
32+
name: Get minio target image
33+
id: imageMinioMirror
34+
uses: mikefarah/[email protected]
35+
with:
36+
cmd: yq '.spec.template.spec.containers[0].image' base/minio-statefulset.yaml
37+
-
38+
name: Get minio official image
39+
id: imageMinioFrom
40+
uses: mikefarah/[email protected]
41+
with:
42+
cmd: echo ${{ steps.imageMinioMirror.outputs.result }} | sed 's|ghcr.io/yolean|docker.io/minio|'
43+
-
44+
run: |
45+
crane cp docker.io/minio/minio:RELEASE.2022-01-03T18-22-58Z ghcr.io/yolean/minio:RELEASE.2022-01-03T18-22-58Z
46+
crane cp ${{ steps.imageMinioFrom.outputs.result }} ${{ steps.imageMinioMirror.outputs.result }}

base/minio-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
spec:
2020
containers:
2121
- name: minio
22-
image: docker.io/minio/minio:RELEASE.2022-06-03T01-40-53Z
22+
image: ghcr.io/yolean/minio:RELEASE.2022-06-03T01-40-53Z
2323
args:
2424
- server
2525
env:

0 commit comments

Comments
 (0)