Skip to content

Commit

Permalink
ci: add a NO_DEPLOY flag to temporarily block deployments (openfoodfa…
Browse files Browse the repository at this point in the history
…cts#10720)

This enable long running operations on staging (eg. testing a
migration).
  • Loading branch information
alexgarel authored Aug 21, 2024
1 parent 3d7e99e commit 281a262
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,29 @@ jobs:
echo "SSH_HOST=10.1.0.200" >> $GITHUB_ENV
echo "SSH_PROXY_HOST=ovh1.openfoodfacts.org" >> $GITHUB_ENV
echo "SSH_USERNAME=off" >> $GITHUB_ENV
- name: Set various variable for prod (org) deployment
if: matrix.env == 'off-org'
run: |
# FIXME: we do not deploy to prod currently
false
- name: Check for an eventual NO_DEPLOY file to put deployment on hold
uses: appleboy/ssh-action@master
with:
host: ${{ env.SSH_HOST }}
username: ${{ env.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
proxy_host: ${{ env.SSH_PROXY_HOST }}
proxy_username: ${{ env.SSH_USERNAME }}
proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
if [[ -f /home/off/${{ matrix.env }}/NO_DEPLOY ]]
then
>&2 echo "A NO_DEPLOY file exists (in /home/off/${{ matrix.env }}), failing !"
exit 1
fi
- name: Wait for frontend container build workflow
uses: tomchv/[email protected]
id: wait-build
Expand Down

0 comments on commit 281a262

Please sign in to comment.