Skip to content

feat: add CI builds + attestation #8

feat: add CI builds + attestation

feat: add CI builds + attestation #8

Workflow file for this run

name: cloud-hello
on:
pull_request:
merge_group:
workflow_dispatch:
push:
branches:
- main
tags:
- cloud-hello-v*
paths:
- 'cloud-hello/**'
env:
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy --no-deps
working-directory: cloud-hello
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
rustup target add wasm32-wasi
cargo build --target wasm32-wasi
working-directory: cloud-hello
release:
runs-on: ubuntu-latest
needs: [build]
#if: startsWith(github.ref, 'refs/tags/cloud-hello-v')
permissions:
contents: read
packages: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: rustup target add wasm32-wasi
- uses: taiki-e/install-action@v2
with:
tool: wash-cli@latest
- name: Build and push
run: |
wash build
working-directory: cloud-hello
- name: Push
id: push
env:
WASH_REG_USER: ${{ github.repository_owner }}
WASH_REG_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |

Check failure on line 59 in .github/workflows/cloud-hello.yml

View workflow run for this annotation

GitHub Actions / cloud-hello

Invalid workflow file

The workflow is not valid. .github/workflows/cloud-hello.yml (Line: 59, Col: 14): Unexpected symbol: 'REGISTRY}/${{env'. Located at position 5 within expression: env.REGISTRY}/${{env.REPOSITORY
wash push ${{env.REGISTRY}/${{env.REPOSITORY}}/cloud-hello:$GITHUB_SHA
echo "digest=$(docker manifest inspect {{env.REGISTRY}}/{{env.REPOSITORY}}:$GITHUB_SHA | jq .config.digest -r)" >> "$GITHUB_OUTPUT"
working-directory: cloud-hello
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/${{github.repository}}/cloud-hello
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true