SolidStudies - Added interface #19
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: Build and push Docker image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Add SSH key | |
env: | |
SSH_PRIVATE_KEY_BASE64: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
echo "$SSH_PRIVATE_KEY_BASE64" | base64 --decode > id_rsa | |
chmod 600 id_rsa | |
ssh-agent sh -c 'ssh-add id_rsa; git clone git@github.com:solidjobs/ote-dialogflow-client.git dialogflow' | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docker/prod/Dockerfile | |
push: true | |
tags: hanschrome/solidjobs-web:latest | |
args: | | |
--build-arg SSH_PRIVATE_KEY="${{ steps.decode_ssh_key.outputs.private_key }}" |