Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrated ci #123

Merged
merged 1 commit into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deployment
concurrency: production

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
automerge:
name: Auto-merge
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
needs: Test
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: 'Merge (if dependabot)'
uses: fastify/github-action-merge-dependabot@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}


Test:
if: github.event_name == 'pull_request'
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Directly affected tests
run: yarn test
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: All tests
# Use npx to try to generate only
# bazel generated node_modules
run: yarn run bazelisk test //...
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}


deployment:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Deploy
# Use npx to try to generate only
# bazel generated node_modules
run: yarn run bazelisk run //deploy:deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_SECRET }}

30 changes: 0 additions & 30 deletions .github/workflows/deployment.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pull_request.yml

This file was deleted.