Merge pull request #456 from spinframework/dependabot/go_modules/gith… #229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v6 | |
| - 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: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.x' | |
| - name: Install TinyGo | |
| uses: acifani/setup-tinygo@v2 | |
| with: | |
| tinygo-version: '0.39.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 |