-
Notifications
You must be signed in to change notification settings - Fork 492
32 lines (32 loc) · 915 Bytes
/
get_image.yaml
File metadata and controls
32 lines (32 loc) · 915 Bytes
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
---
name: get-image
on:
workflow_call:
inputs:
image-base-name:
required: true
type: string
ref:
type: string
required: false
default: ''
outputs:
image-with-tag:
description: "A image with tag (from docker.properties) for the requested image"
value: ${{ jobs.get-image.outputs.image-with-tag }}
permissions:
contents: read
jobs:
get-image:
runs-on: ubuntu-latest
outputs:
image-with-tag: ${{ steps.get-version.outputs.image }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref }}
- id: get-version
run: >-
IMAGE_NAME="ghcr.io/pixie-io/${{ inputs.image-base-name }}";
IMAGE_TAG="$(grep DOCKER_IMAGE_TAG docker.properties | cut -d'=' -f2)";
echo "image=${IMAGE_NAME}:${IMAGE_TAG}" >> $GITHUB_OUTPUT