Skip to content

test: disable running on push #51

test: disable running on push

test: disable running on push #51

Workflow file for this run

# This workflow should build docker images every time code is pushed to the repository
name: Build Docker Images
on:
push:
# List of jobs to be run
jobs:
build:
name: Build Docker Images
runs-on: ubuntu-latest
strategy: # Use a matrix strategy to run the build process for all our containers
matrix:
# Add any future services relative paths from . here
service: [client, server/chat, server/gateway, server/matching, server/user, genai]
steps:
# Use pre-existing action to login to GHCR.io
- name: Login to GHCR.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Use a pre-existing action to setup Docker Buildkit
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
# Get tags and lables for publishing image
- name: Get labels and tags for publishing
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.service }} # ex: ghcr.io/aet-devops25/team-devoops/server/gateway
# Tags pushes to main with :latest, pushes to branches with ex :feature-github-actions-workflow, and PRs with ex :pr-42
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
# Use a pre-existing action to build docker image
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: "{{ defaultContext }}:${{ matrix.service }}" # run in the subdirectory specified by matrix
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}