Skip to content

Commit 23b8f79

Browse files
committed
GitHub workflow to publish env TOMLs
Signed-off-by: itowlson <[email protected]>
1 parent 39da5a2 commit 23b8f79

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish environment definition to registry
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "spin-up.(ver).toml version, e.g. 3.4, 3.5"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
publish-wit:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write
16+
packages: write
17+
contents: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
23+
- name: Install oras
24+
uses: oras-project/setup-oras@v1
25+
26+
- name: Login to the GitHub registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: spinframeworkbot
31+
password: ${{ secrets.SPIN_WIT_PAT }}
32+
33+
- name: Publish environment TOML
34+
shell: bash
35+
env:
36+
VERSION: ${{ inputs.version }}
37+
run: ./scripts/build-and-publish-wit.sh

scripts/push-env-def.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
oras push ghcr.io/spinframework/environments/spin-up:$VERSION target-envs/spin-up.$VERSION.toml

0 commit comments

Comments
 (0)