Skip to content

chore(ci): move to GitHub actions #17

chore(ci): move to GitHub actions

chore(ci): move to GitHub actions #17

Workflow file for this run

name: User API
on:
# Only run the tests for this service when any of the following file paths change
pull_request:
paths:
- 'infrastructure/user-api/**'
- 'packages/**'
- 'servers/user-api/**'
- 'pnpm-lock.yaml'
- '.github/actions/**'
- '.github/workflows/user_api.yml'
push:
branches:
- main
- dev
jobs:
# Let's test the service against some real life and mocked docker services.
test-integrations:
# Only run this job on a pull request event
if: github.event_name == 'pull_request'
# Use our re-usable test integrations workflow which will use our docker compose file
uses: ./.github/workflows/test-integrations.yml
with:
# Only run the tests for our service
scope: 'user-api'
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# It's infrastructure time, run the infrastructure update commands
infrastructure:

Check failure on line 31 in .github/workflows/user-api.yml

View workflow run for this annotation

GitHub Actions / User API

Invalid workflow file

The workflow is not valid. .github/workflows/user-api.yml (Line: 31, Col: 3): Error calling workflow 'Pocket/pocket-monorepo/.github/workflows/infrastructure.yml@5b75286171f78cfc086c1fa810b46206621375e0'. The workflow is requesting 'pull-requests: write', but is only allowed 'pull-requests: none'.
uses: ./.github/workflows/infrastructure.yml
with:
scope: user-api-cdk
stack-output-path: infrastructure/user-api/cdktf.out/stacks/user-api
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# Let's try building and conidtionally pushing our docker image to the necessary account.
build-and-push-image:
uses: ./.github/workflows/build-and-push-image.yml
#needs: [infrastructure]
with:
scope: user-api
app-path: servers/user-api
app-port: 4006
sentry-project: user-api
docker-repo-name-short-hand: userapi
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# deploy:
# needs: [infrastructure]
# with:
# terraform-output: ${{ needs.infrastructure.outputs.terraform-output }}