Skip to content

Adding the main and staging pipelines to work on PR merges #1

Adding the main and staging pipelines to work on PR merges

Adding the main and staging pipelines to work on PR merges #1

Workflow file for this run

name: ci-main
on:
pull_request:
types: [closed]
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/giveth/giveconomy-notification-service:main
deploy:
if: github.event.pull_request.merged == true
needs: publish
runs-on: ubuntu-latest
steps:
- name: Production deploy
uses: garygrossgarten/[email protected]
with:
command: cd giveconomy-notification-service && git checkout main && git pull && docker-compose -f docker-compose-production.yml
pull && docker-compose -f docker-compose-production.yml down && docker-compose -f docker-compose-production.yml up -d && docker image prune

Check failure on line 41 in .github/workflows/main-pipeline.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main-pipeline.yml

Invalid workflow file

You have an error in your yaml syntax on line 41
-a --force;
host: ${{ secrets.PRODUCTION_HOST }}
username: ${{ secrets.PRODUCTION_USERNAME }}
privateKey: ${{ secrets.PRODUCTION_PRIVATE_KEY}}