Update Dockerfile #15
Workflow file for this run
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 - Server | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Initialize Buildx | |
run: | | |
docker buildx create --name codbex-builder || true | |
docker buildx use codbex-builder | |
- name: Build Docker Image | |
run: | | |
docker buildx build --tag online_bank -o type=image --platform=linux/arm64,linux/amd64 . | |
- name: Login to GitHub Container Registry | |
run: | | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Push Docker Image to GitHub Container Registry | |
run: | | |
docker buildx build --push --tag ghcr.io/tivmof/online_bank:latest -o type=image --platform=linux/arm64,linux/amd64 . |