Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

PI-491: move repo to GHA #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy

on:
push:
branches: [master]

pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
init:
runs-on: [self-hosted, fear]
outputs:
skip: ${{ steps.ci-skip-step.outputs.ci-skip }}
skip-not: ${{ steps.ci-skip-step.outputs.ci-skip-not }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: mstachniuk/ci-skip@master
id: ci-skip-step
with:
commit-filter: '[skip ci]'
deploy_aws:
name: Deploy
runs-on: [self-hosted, fear]
needs: init
if: ${{ needs.init.outputs.skip == 'false' }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Use custom token from repo secrets to allow semantic release to push commit:
# https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/github-actions.md#pushing-packagejson-changes-to-a-master-branch
persist-credentials: false
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm config set '//npm.pkg.github.com/:_authToken' $GH_TOKEN
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- run: npm config set @typeform:registry https://npm.pkg.github.com/
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- run: npm run install:$GH_TOKEN
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- run: npm test

- name: After Success
if: contains(github.ref, 'refs/heads/master')
run: npm publish
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/secrets-scans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Secrets Scan

on: [push, pull_request]

jobs:
secrets-scan:
# for private repositories
# runs-on: [self-hosted, automated-checks]
# for public repositories
runs-on: [ubuntu-latest]

steps:
- name: Check Out Source Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Secrets Scan
uses: Typeform/.github/shared-actions/secrets-scan@master
with:
docker-registry: ${{ secrets.DOCKER_REGISTRY }}
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_PASSWORD }}
gh-token: ${{ secrets.GH_TOKEN }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.