ci: remove container #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-pipeline | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: yarn install | |
- name: Install PostgreSQL client | |
run: apt-get update && apt-get install -y postgresql-client | |
- name: Create .env file | |
uses: SpicyPizza/[email protected] | |
with: | |
envkey_API_KEY: ${{ secrets.API_KEY }} | |
envkey_APP_ID: ${{ secrets.APP_ID }} | |
envkey_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
envkey_ACT_PRIVATE_KEY: ${{ secrets.ACT_PRIVATE_KEY }} | |
envkey_ACT_PUBLIC_KEY: ${{ secrets.ACT_PUBLIC_KEY }} | |
envkey_RFT_PRIVATE_KEY: ${{ secrets.RFT_PRIVATE_KEY }} | |
envkey_RFT_PUBLIC_KEY: ${{ secrets.RFT_PUBLIC_KEY }} | |
envkey_DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
envkey_BCYPT_SALT: ${{ secrets.BCYPT_SALT }} | |
- name: Run tests | |
run: yarn test | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: leviszaboo/act_base:latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create .env file | |
uses: SpicyPizza/[email protected] | |
with: | |
envkey_API_KEY: ${{ secrets.API_KEY }} | |
envkey_APP_ID: ${{ secrets.APP_ID }} | |
envkey_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
envkey_ACT_PRIVATE_KEY: ${{ secrets.ACT_PRIVATE_KEY }} | |
envkey_ACT_PUBLIC_KEY: ${{ secrets.ACT_PUBLIC_KEY }} | |
envkey_RFT_PRIVATE_KEY: ${{ secrets.RFT_PRIVATE_KEY }} | |
envkey_RFT_PUBLIC_KEY: ${{ secrets.RFT_PUBLIC_KEY }} | |
envkey_DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
envkey_BCYPT_SALT: ${{ secrets.BCYPT_SALT }} | |
- name: Production build | |
run: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d |