-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copies current images through actions
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
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 mariadb docker hub image | ||
id: imageMariadbFrom | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq '.images[0].name + ":" + .images[0].newTag' 'base/kustomization.yaml' | ||
- | ||
name: Get mariadb target image | ||
id: imageMariadbTo | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq '.images[0].newName + ":" + .images[0].newTag' 'base/kustomization.yaml' | ||
- | ||
name: Get exporter docker hub image | ||
id: imageMariadbFrom | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq '.images[1].name + ":" + .images[1].newTag' 'base/kustomization.yaml' | ||
- | ||
name: Get exporter target image | ||
id: imageMariadbTo | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq '.images[1].newName + ":" + .images[1].newTag' 'base/kustomization.yaml' | ||
- | ||
run: | | ||
crane cp ${{ steps.imageMariadbFrom.outputs.result }} ${{ steps.imageMariadbTo.outputs.result }} | ||
crane cp ${{ steps.imageExporterFrom.outputs.result }} ${{ steps.imageExporterTo.outputs.result }} |
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