-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (34 loc) · 1.02 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: "Build and Push Docker Images"
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build-and-push-images:
runs-on: ubuntu-latest
strategy:
matrix:
service: [frontend, backend, harvester, statcruncher, pongbot]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Propel Container Registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
registry: registry.propel.sh
username: ${{ secrets.PROPEL_REGISTRY_USER }}
password: ${{ secrets.PROPEL_REGISTRY_TOKEN }}
- name: Build and push ${{ matrix.service }} image
uses: docker/build-push-action@v4
with:
context: ./${{ matrix.service }}
push: ${{ github.ref == 'refs/heads/main' }}
tags: registry.propel.sh/transcendence/${{ matrix.service }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max