feat: add dev-test-iroh deployment #41
Workflow file for this run
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: Preview | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: {} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update apt index | |
| run: sudo apt-get update | |
| - name: Install cloud-init | |
| run: sudo apt-get install -y cloud-init | |
| - name: Lint dev-test cloud-init file | |
| run: | | |
| if ! cloud-init schema -c dev-test/cloud-init.yaml 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY | |
| then | |
| # Print errors as such in GitHub logs. | |
| cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g' | |
| exit 1 | |
| fi | |
| - name: Lint dev-test-bootstrap2-iroh cloud-init file | |
| run: | | |
| if ! cloud-init schema -c dev-test-bootstrap2-iroh/cloud-init.yaml 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY | |
| then | |
| # Print errors as such in GitHub logs. | |
| cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=dev-test-bootstrap2-iroh\/cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g' | |
| exit 1 | |
| fi | |
| - name: Lint hc-auth-iroh-unyt cloud-init file | |
| run: | | |
| if ! cloud-init schema -c hc-auth-iroh-unyt/cloud-init.yaml.tmpl 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY | |
| then | |
| # Print errors as such in GitHub logs. | |
| cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g' | |
| exit 1 | |
| fi | |
| preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: ./go.mod | |
| - name: Install dependencies | |
| run: go get . | |
| - name: Build | |
| run: go build -v ./... | |
| - uses: pulumi/actions@v6 | |
| with: | |
| command: preview | |
| stack-name: holochain/network-services | |
| comment-on-pr: true | |
| diff: true | |
| github-token: ${{ secrets.HRA2_GITHUB_TOKEN }} | |
| env: | |
| PULUMI_ACCESS_TOKEN: ${{ secrets.HRA2_PULUMI_ACCESS_TOKEN }} | |
| ci_pass: | |
| if: always() | |
| needs: | |
| - lint | |
| - preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Decide whether the required jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |