-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (44 loc) · 1.2 KB
/
images.yaml
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
name: images
on:
push:
branches:
- master
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
uses: actions/setup-go@v5
with:
go-version: 1.22
-
uses: imjasonh/[email protected]
-
name: Get minio target image
id: imageMinioMirror
uses: mikefarah/[email protected]
with:
cmd: yq '.spec.template.spec.containers[0].image' base/minio-statefulset.yaml
-
name: Get minio official image
id: imageMinioFrom
uses: mikefarah/[email protected]
with:
cmd: echo ${{ steps.imageMinioMirror.outputs.result }} | sed 's|ghcr.io/yolean|docker.io/minio|'
-
run: |
crane cp docker.io/minio/minio:RELEASE.2022-01-03T18-22-58Z ghcr.io/yolean/minio:RELEASE.2022-01-03T18-22-58Z
crane cp ${{ steps.imageMinioFrom.outputs.result }} ${{ steps.imageMinioMirror.outputs.result }}