Fix build context. #101
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: Deploy Docker Compose | |
on: | |
push: | |
branches: | |
- DEPLOY-back-end | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
uses: KengoTODA/actions-setup-docker-compose@v1 | |
with: | |
version: "2.14.2" | |
- name: Log in to Azure | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: "ACR Login" | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.ACR_LOGIN_SERVER }} | |
username: ${{ secrets.ACR_USERNAME }} | |
password: ${{ secrets.ACR_PASSWORD }} | |
- name: Get the version | |
id: get_version | |
run: echo "::set-output name=VERSION::$(git rev-parse --short HEAD)" | |
- name: Build and Push Docker images | |
run: | | |
docker build -t goblockchain.azurecr.io/wallet-server:${{ steps.get_version.outputs.VERSION }} -f ./cmd/wallet_server/Dockerfile ../.. | |
docker push goblockchain.azurecr.io/wallet-server:${{ steps.get_version.outputs.VERSION }} | |
docker build -t goblockchain.azurecr.io/miner:${{ steps.get_version.outputs.VERSION }} -f ./cmd/blockchain_server/Dockerfile ../.. | |
docker push goblockchain.azurecr.io/miner:${{ steps.get_version.outputs.VERSION }} |