-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (36 loc) · 1.22 KB
/
sample-apps.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish Sample Apps
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
publish-image:
name: Publish sample app images
runs-on: ubuntu-latest
strategy:
matrix:
app: [cpu-load-gen, hello-world, outbound-http, variabletester, redis-sample, salutations]
env:
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v4
- name: Set the release version
shell: bash
run: |
echo "RELEASE_VERSION=$(date +%Y%m%d-%H%M%S)-g$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Install Spin
uses: fermyon/actions/spin/setup@v1
- name: Install TinyGo
uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.33.0'
- name: Build and push versioned image
uses: fermyon/actions/spin/push@v1
with:
registry: ${{ env.REGISTRY }}
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
registry_reference: "ghcr.io/${{ github.repository_owner }}/spin-operator/${{ matrix.app }}:${{ env.RELEASE_VERSION }}"
manifest_file: apps/${{ matrix.app }}/spin.toml