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

name: ci-staging
on:
pull_request:
types: [closed]
branches:
- staging
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:staging
deploy:
if: github.event.pull_request.merged == true
needs: publish
runs-on: ubuntu-latest
steps:
- name: Staging deploy
uses: garygrossgarten/[email protected]
with:
command: cd giveconomy-notification-service && git checkout staging && git pull && docker-compose -f docker-compose-staging.yml
pull && docker-compose -f docker-compose-staging.yml down && docker-compose -f docker-compose-staging.yml up -d && docker image prune -a

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

View workflow run for this annotation

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

Invalid workflow file

You have an error in your yaml syntax on line 41
--force;
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USERNAME }}
privateKey: ${{ secrets.STAGING_PRIVATE_KEY}}