action run testing-36
This commit is contained in:
34
action.yaml
Normal file
34
action.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: "publish docker image"
|
||||||
|
description: "Tag and push docker image to GCP artifact registry"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
image_name:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
image_local_tag:
|
||||||
|
required: false
|
||||||
|
default: "latest"
|
||||||
|
|
||||||
|
repository_location:
|
||||||
|
required: false
|
||||||
|
default: "europe-docker.pkg.dev/puzzle-and-play/docker"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: "publish docker image"
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_LOCAL_NAME: "${{ inputs.image_name }}"
|
||||||
|
IMAGE_LOCAL_TAG: "${{ inputs.image_local_tag }}"
|
||||||
|
IMAGE_REMOTE_NAME: "${{ inputs.repository_location }}/${{ inputs.image_name }}"
|
||||||
|
IMAGE_REMOTE_TAG: "${{ github.ref_name }}-${{ github.run_number }}"
|
||||||
|
|
||||||
|
run: |
|
||||||
|
echo "image: $IMAGE_REMOTE_NAME:$IMAGE_REMOTE_TAG"
|
||||||
|
|
||||||
|
docker tag \
|
||||||
|
"$IMAGE_LOCAL_NAME:$IMAGE_LOCAL_TAG" \
|
||||||
|
"$IMAGE_REMOTE_NAME:$IMAGE_REMOTE_TAG"
|
||||||
|
|
||||||
|
docker push "$IMAGE_REMOTE_NAME:$IMAGE_REMOTE_TAG"
|
||||||
Reference in New Issue
Block a user