refactor to use shared builds + secrets
All checks were successful
Build and push image for doorman-homeassistant / diff (push) Successful in 1m32s
Build and push Doorman UI / API / diff (push) Successful in 11s
Build and push image for doorman-homeassistant / docker (push) Has been skipped
Build and push image for doorman-homeassistant / deploy-gitainer (push) Has been skipped
Build and push Doorman UI / API / twilio (push) Successful in 3m22s
All checks were successful
Build and push image for doorman-homeassistant / diff (push) Successful in 1m32s
Build and push Doorman UI / API / diff (push) Successful in 11s
Build and push image for doorman-homeassistant / docker (push) Has been skipped
Build and push image for doorman-homeassistant / deploy-gitainer (push) Has been skipped
Build and push Doorman UI / API / twilio (push) Successful in 3m22s
This commit is contained in:
parent
94c42075f7
commit
d719014538
@ -8,22 +8,13 @@ jobs:
|
|||||||
diff:
|
diff:
|
||||||
uses: martin/chromart-gitea-actions/.gitea/workflows/diff-output.yaml@main
|
uses: martin/chromart-gitea-actions/.gitea/workflows/diff-output.yaml@main
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
files: packages/doorman-homeassistant/**
|
files: packages/doorman-homeassistant/**
|
||||||
secrets:
|
|
||||||
token: ${{ github.token }}
|
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
needs: diff
|
needs: diff
|
||||||
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
||||||
uses: martin/chromart-gitea-actions/.gitea/workflows/docker-publish-private.yaml@main
|
uses: martin/chromart-gitea-actions/.gitea/workflows/docker-publish-private.yaml@main
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
image_name: doorman-homeassistant
|
image_name: doorman-homeassistant
|
||||||
secrets:
|
|
||||||
token: ${{ github.token }}
|
|
||||||
deploy-gitainer:
|
deploy-gitainer:
|
||||||
needs: docker
|
needs: docker
|
||||||
uses: martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
uses: martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
||||||
|
|||||||
@ -8,17 +8,15 @@ jobs:
|
|||||||
diff:
|
diff:
|
||||||
uses: martin/chromart-gitea-actions/.gitea/workflows/diff-output.yaml@main
|
uses: martin/chromart-gitea-actions/.gitea/workflows/diff-output.yaml@main
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
files: packages/**
|
files: packages/**
|
||||||
secrets:
|
|
||||||
token: ${{ github.token }}
|
|
||||||
|
|
||||||
twilio:
|
twilio:
|
||||||
needs: diff
|
needs: diff
|
||||||
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
- name: Load Infisical Secrets
|
||||||
|
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/actions/infisical-secrets@main
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Check out code
|
name: Check out code
|
||||||
|
|
||||||
@ -32,30 +30,32 @@ jobs:
|
|||||||
- name: run local integration test
|
- name: run local integration test
|
||||||
run: bun integ-test:local
|
run: bun integ-test:local
|
||||||
env:
|
env:
|
||||||
ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
|
ACCOUNT_SID: ${{ env.DOORMAN_TWILIO_ACCOUNT_SID }}
|
||||||
AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
|
AUTH_TOKEN: ${{ env.DOORMAN_TWILIO_AUTH_TOKEN }}
|
||||||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
|
AWS_ACCESS_KEY: ${{ env.AWS_ACCESS_KEY }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
|
||||||
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
|
DISCORD_BOT_TOKEN: ${{ env.DOORMAN_DISCORD_BOT_TOKEN }}
|
||||||
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
|
DISCORD_CLIENT_SECRET: ${{ env.DOORMAN_DISCORD_CLIENT_SECRET }}
|
||||||
|
|
||||||
- name: Deploy Doorman UI and API to staging
|
- name: Deploy Doorman UI and API to staging
|
||||||
run: bun run deploy-serverless:staging
|
run: bun run deploy-serverless:staging
|
||||||
env:
|
env:
|
||||||
ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
|
ACCOUNT_SID: ${{ env.DOORMAN_TWILIO_ACCOUNT_SID }}
|
||||||
AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
|
AUTH_TOKEN: ${{ env.DOORMAN_TWILIO_AUTH_TOKEN }}
|
||||||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
# required for deploy-serverless
|
||||||
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
|
AWS_ACCESS_KEY: ${{ env.AWS_ACCESS_KEY }}
|
||||||
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
|
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
DISCORD_BOT_TOKEN: ${{ env.DOORMAN_DISCORD_BOT_TOKEN }}
|
||||||
|
DISCORD_CLIENT_SECRET: ${{ env.DOORMAN_DISCORD_CLIENT_SECRET }}
|
||||||
STAGE: staging
|
STAGE: staging
|
||||||
DOORMAN_URL: https://doorman-6741-staging.twil.io
|
DOORMAN_URL: https://doorman-6741-staging.twil.io
|
||||||
|
|
||||||
- name: Deploy Doorman Buzzer Client to staging
|
- name: Deploy Doorman Buzzer Client to staging
|
||||||
run: bun run deploy-buzzer-client:staging
|
run: bun run deploy-buzzer-client:staging
|
||||||
env:
|
env:
|
||||||
ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
|
ACCOUNT_SID: ${{ env.DOORMAN_TWILIO_ACCOUNT_SID }}
|
||||||
AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
|
AUTH_TOKEN: ${{ env.DOORMAN_TWILIO_AUTH_TOKEN }}
|
||||||
STAGE: staging
|
STAGE: staging
|
||||||
DOORMAN_URL: https://doorman-6741-staging.twil.io
|
DOORMAN_URL: https://doorman-6741-staging.twil.io
|
||||||
|
|
||||||
@ -68,15 +68,17 @@ jobs:
|
|||||||
- name: Promote Doorman UI and API staging to prod
|
- name: Promote Doorman UI and API staging to prod
|
||||||
run: bun run deploy-serverless
|
run: bun run deploy-serverless
|
||||||
env:
|
env:
|
||||||
ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
|
# promote doesn't need the keys other than twilio. it copies from staging
|
||||||
AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
|
ACCOUNT_SID: ${{ env.DOORMAN_TWILIO_ACCOUNT_SID }}
|
||||||
|
AUTH_TOKEN: ${{ env.DOORMAN_TWILIO_AUTH_TOKEN }}
|
||||||
STAGE: prod
|
STAGE: prod
|
||||||
DOORMAN_URL: https://doorman.chromart.cc
|
DOORMAN_URL: https://doorman.chromart.cc
|
||||||
|
|
||||||
- name: Promote Doorman Buzzer Client staging to prod
|
- name: Promote Doorman Buzzer Client staging to prod
|
||||||
run: bun run deploy-buzzer-client
|
run: bun run deploy-buzzer-client
|
||||||
env:
|
env:
|
||||||
ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
|
# same for buzzer client
|
||||||
AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
|
ACCOUNT_SID: ${{ env.DOORMAN_TWILIO_ACCOUNT_SID }}
|
||||||
|
AUTH_TOKEN: ${{ env.DOORMAN_TWILIO_AUTH_TOKEN }}
|
||||||
STAGE: prod
|
STAGE: prod
|
||||||
DOORMAN_URL: https://doorman.chromart.cc
|
DOORMAN_URL: https://doorman.chromart.cc
|
||||||
|
|||||||
@ -61,3 +61,5 @@ It uses DDB for the backend
|
|||||||
After the twilio functions I have setup a cloudflare worker at https://doorman.chromart.cc to proxy the requests to the twilio lambda
|
After the twilio functions I have setup a cloudflare worker at https://doorman.chromart.cc to proxy the requests to the twilio lambda
|
||||||
|
|
||||||
The cloudflare worker just proxies requests so the endpoint is a bit nicer
|
The cloudflare worker just proxies requests so the endpoint is a bit nicer
|
||||||
|
|
||||||
|
trigger build
|
||||||
Loading…
x
Reference in New Issue
Block a user