Skip to content

copies current images through actions #2

copies current images through actions

copies current images through actions #2

Workflow file for this run

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: imageExporterFrom
uses: mikefarah/[email protected]
with:
cmd: yq '.images[1].name + ":" + .images[1].newTag' 'base/kustomization.yaml'
-
name: Get exporter target image
id: imageExporterTo
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 }}