Skip to content

Avoid the use of env var #16

Avoid the use of env var

Avoid the use of env var #16

Workflow file for this run

name: Build
on:
push:
branches: [master, main]
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3
- name: Build image
run: docker buildx build . -o type=oci,dest=image.tar
- name: Push image to Caasis
run: gzip -c image.tar | curl -Lu "${{ secrets.CAASIS_API_KEY }}" --data-binary @- https://api.caasis.cloud/new/$GITHUB_REPOSITORY/$GITHUB_HEAD_REF | tee ~/url
if: ${{ github.head_ref }}
- name: Comment on Pull Request
run: 'echo "Preview environment: $(cat ~/url)" | gh pr comment --create-if-none --edit-last $GITHUB_HEAD_REF -F-'
if: ${{ github.head_ref }}
env:
GH_TOKEN: ${{ github.token }}