Skip to content

Commit

Permalink
mirrors images
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed Jul 6, 2024
1 parent 273d964 commit 923e116
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}
2 changes: 1 addition & 1 deletion base/minio-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: minio
image: docker.io/minio/minio:RELEASE.2022-06-03T01-40-53Z
image: ghcr.io/yolean/minio:RELEASE.2022-06-03T01-40-53Z
args:
- server
env:
Expand Down

0 comments on commit 923e116

Please sign in to comment.