Skip to content

Bump dustmaps from 1.0.10 to 1.0.13 #1134

Bump dustmaps from 1.0.10 to 1.0.13

Bump dustmaps from 1.0.10 to 1.0.13 #1134

Workflow file for this run

name: "Deployment"
on:
push:
branches: [master]
pull_request:
types: [opened, reopened, synchronize, closed]
pull_request_review:
types: [submitted]
schedule:
- cron: '12 20 12 * *'
jobs:
subdomain:
runs-on: ubuntu-latest
outputs:
output: ${{ steps.final.outputs.output }}
steps:
- name: Cancel if pull request is not approved
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state != 'approved' }}
run: exit 1
- name: Checkout repository
uses: actions/checkout@v4
- name: Set SUBDOMAIN=pr#
if: ${{ github.event_name != 'push' }}
run: echo "SUBDOMAIN=pr${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Set SUBDOMAIN=master
if: ${{ github.event_name == 'push' }}
run: echo "SUBDOMAIN=master" >> $GITHUB_ENV
- name: Output
id: final
run: echo "::set-output name=output::${SUBDOMAIN}"
deploy:
needs: subdomain
runs-on: ubuntu-latest
env:
SUBDOMAIN: ${{ github.event.pull_request.number || 'master' }}
concurrency:
group: "deploy ${{ needs.subdomain.outputs.output }}"
cancel-in-progress: true
steps:
- name: Cancel if pull request is not approved
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state != 'approved' }}
run: exit 1
- name: Checkout repository
uses: actions/checkout@v4
- name: Set SUBDOMAIN env var
run: echo "SUBDOMAIN=${{ needs.subdomain.outputs.output }}" >> $GITHUB_ENV
- name: Generate docker-compose.yml
run: envsubst < .ci/docker-compose.yml.tmpl | tee docker-compose-github.yml
- name: Set up SSH
run: |
mkdir -p ${HOME}/.ssh
echo "${{ secrets.DEV_SNAD_SSH_KEY }}" > ${HOME}/.ssh/id_rsa
ls -lk ${HOME}/.ssh/id_rsa
chmod 600 ${HOME}/.ssh/id_rsa
ssh-keyscan -t ssh-rsa dev.snad.space >> ${HOME}/.ssh/known_hosts
- name: Set up Docker context
run: docker context create dev-snad --docker "host=ssh://[email protected]"
- name: Stop
run: |
docker context use dev-snad
docker compose -f docker-compose-github.yml -p ${SUBDOMAIN} down
- name: Start
if: ${{ github.event.pull_request.state != 'closed' }}
run: |
docker context use dev-snad
docker compose -f docker-compose-github.yml -p ${SUBDOMAIN} build --build-arg GITHUB_SHA
docker compose -f docker-compose-github.yml -p ${SUBDOMAIN} up -d