fix(docker): correct env notation in dockerfile (#1420) #720
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: ⛵️ Push On Develop Branch Workflow | |
on: | |
push: | |
branches: | |
- "develop" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
upload-to-docker-hub: | |
name: Upload image with develop tag to Docker Hub 🐳 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub 🔐 | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Set up QEMU 🏗️ | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx 🏗️ | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push Docker image 🐳 | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: antoinezanardi/werewolves-assistant-api:develop | |
- name: Deploy to preproduction server 🚀 | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.PREPRODUCTION_SERVER_SSH_PRIVATE_KEY }} | |
SSH_USER: ${{ secrets.PREPRODUCTION_SERVER_SSH_USER }} | |
SSH_SERVER_IP: ${{ secrets.PREPRODUCTION_SERVER_SSH_ADDRESS }} | |
UPDATE_SCRIPT_FULL_PATH: ${{ secrets.PREPRODUCTION_UPDATE_SCRIPT_FULL_PATH }} | |
run: | | |
eval $(ssh-agent -s) | |
echo "$SSH_PRIVATE_KEY" | ssh-add - | |
ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_SERVER_IP << EOF | |
$UPDATE_SCRIPT_FULL_PATH | |
EOF |