Update README.md #13
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 Backend Docker Container to GitHub Container Registry | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Log in to GitHub Container Registry (GHCR) | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
# Build and push keyfade-backend container - hard coded name due to repo capitalisation | |
- name: Build and Push keyfade-backend container | |
run: | | |
cd keyfade-backend | |
docker build \ | |
--build-arg CLIENT_ID=${{ secrets.CLIENT_ID }} \ | |
--build-arg CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \ | |
--build-arg TENANT_ID=${{ secrets.TENANT_ID }} \ | |
--build-arg KEY_VAULT_NAME=${{ secrets.KEY_VAULT_NAME }} \ | |
--build-arg BACKEND_URL=${{ secrets.BACKEND_URL }} \ | |
--build-arg FRONTEND_URL=${{ secrets.FRONTEND_URL }} \ | |
--build-arg HMAC_SECRET=${{ secrets.HMAC_SECRET }} \ | |
--build-arg WEBHOOK_URL=${{ secrets.WEBHOOK_URL }} \ | |
-t ghcr.io/nickjongens/keyfade-backend:latest . | |
docker push ghcr.io/nickjongens/keyfade-backend:latest |