mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
32b839e9f7
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: Make updated OS images available on release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Semantic version tag of the release (vX.Y.Z)."
|
|
required: true
|
|
latest:
|
|
description: "Whether to update the latest tag."
|
|
type: boolean
|
|
default: false
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
with:
|
|
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
with:
|
|
go-version: "1.19.4"
|
|
cache: true
|
|
|
|
- name: Login to AWS
|
|
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
|
|
with:
|
|
role-to-assume: arn:aws:iam::795746500882:role/GithubAddReleaseVersion
|
|
aws-region: eu-central-1
|
|
|
|
- name: Build versionsapi CLI
|
|
working-directory: internal/versionsapi/cli
|
|
run: go build -o versionsapi
|
|
|
|
- name: Add version to versionsapi
|
|
working-directory: internal/versionsapi/cli
|
|
run: |
|
|
latest=$([[ "${{ inputs.latest }}" = "true" ]] && echo "--latest" || echo "")
|
|
./versionsapi add \
|
|
--release \
|
|
--stream "stable" \
|
|
--version "${{ github.event.release.tag_name }}${{ github.event.inputs.tag }}" \
|
|
"${latest}"
|