2022-11-23 03:41:42 -05:00
|
|
|
name: Find latest OS image
|
|
|
|
description: Finds the latest OS image of a given type.
|
|
|
|
|
|
|
|
inputs:
|
2022-12-09 05:51:38 -05:00
|
|
|
ref:
|
|
|
|
description: 'Branch to search on. Can be "-" for releases or a branch name.'
|
2022-11-23 03:41:42 -05:00
|
|
|
required: true
|
2022-12-09 05:51:38 -05:00
|
|
|
default: "main"
|
|
|
|
stream:
|
|
|
|
description: 'Type of image to find. Can be one of "stable", "nightly", "debug".'
|
|
|
|
required: true
|
|
|
|
default: "debug"
|
2022-11-23 03:41:42 -05:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
image:
|
2022-12-09 05:51:38 -05:00
|
|
|
description: "The latest image of the given ref and stream."
|
2022-11-23 03:41:42 -05:00
|
|
|
value: ${{ steps.find-latest-image.outputs.image }}
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Login to AWS
|
|
|
|
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
|
|
|
|
with:
|
|
|
|
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationImageFinder
|
|
|
|
aws-region: eu-central-1
|
|
|
|
|
|
|
|
- name: Find latest image
|
|
|
|
id: find-latest-image
|
|
|
|
shell: bash
|
|
|
|
env:
|
2022-12-09 05:51:38 -05:00
|
|
|
ref: ${{ inputs.ref }}
|
|
|
|
stream: ${{ inputs.stream }}
|
2022-11-23 03:41:42 -05:00
|
|
|
run: |
|
2022-12-09 05:51:38 -05:00
|
|
|
image=$(./find-image.sh --ref "${ref}" --stream "${stream}")
|
2022-11-23 03:41:42 -05:00
|
|
|
echo "image=${image}" >> "${GITHUB_OUTPUT}"
|
2022-12-20 07:54:18 -05:00
|
|
|
echo "Found image '${image}'."
|
2022-12-13 05:08:36 -05:00
|
|
|
working-directory: hack/api
|