Skip to content

Commit

Permalink
use integrated CI, and automerge dependabot complaints (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemnmez authored May 5, 2022
1 parent a8d8afc commit 560fbf2
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 60 deletions.
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.

0 comments on commit 560fbf2

Please sign in to comment.