copies current images through actions #1
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: | ||
- 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 | ||
Check failure on line 45 in .github/workflows/images.yaml GitHub Actions / imagesInvalid workflow file
|
||
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 }} |