diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc93a75..b1dd50d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,5 +36,19 @@ jobs: build-args: | DEPS_FLAGS=--no-dev - # deploy: - # runs-on: ubuntu-latest + deploy: + runs-on: ubuntu-latest + + steps: + - id: build_version + run: | + echo "build_version=$(echo ${GITHUB_SHA} | cut -c1-12)" >> $GITHUB_ENV + - name: Trigger deploy + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.OPS_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/gi0baro/ops/dispatches \ + -d '{"event_type":"deploy_emmett-sh","client_payload":{"build_tag": "${{ env.build_version }}"}}'