mirrors images #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |