-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (29 loc) · 1.1 KB
/
dispatch-example.yml
File metadata and controls
33 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: GitHub action dispath
on:
workflow_dispatch:
inputs:
source-regurl-tag:
required: true
default: ""
description: "Container image registry URL with tag. e.g., gcr.io/project-id-372417/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2"
target-regurl:
required: true
default: ""
description: "Container image registry URL WITHOUT tag e.g., gcr.io/project-id-372417/target-image"
jobs:
copy_container_image:
name: Copy container image
runs-on: ubuntu-latest
env:
SOURCE_IMAGE_WITH_TAG: ${{ github.env.inputs.source-regurl-tag }}
TARGET_IMAGE_URL: ${{ github.env.inputs.target-regurl }}
steps:
- name: Get image tag
run: |
echo IMAGE_TAG=$(echo ${{ env.SOURCE_IMAGE_WITH_TAG }} | cut -d":" -f2) >> $GITHUB_ENV
- name: Summary
run: |
echo "SOURCE_IMAGE_WITH_TAG=${{ env.SOURCE_IMAGE_WITH_TAG }}" >> $GITHUB_STEP_SUMMARY
echo "PROD_IMAGE=${{ env.TARGET_IMAGE_URL }}:${{ env.IMAGE_TAG }}" >> $GITHUB_STEP_SUMMARY
- uses: hmarr/debug-action@v2
if: always()