- Changed the branch name from 'main' to 'master' in the GitHub Actions deploy workflow to align with repository conventions.
30 lines
973 B
YAML
30 lines
973 B
YAML
name: Build Docker images
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
build-and-push-dockerfile-image:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: ./apps/web
|
|
file: ./Dockerfile
|
|
push: true
|
|
# Make sure to replace with your own namespace and repository
|
|
tags: |
|
|
killercf/sgc:latest
|
|
platforms: linux/amd64 |