-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (32 loc) · 1.02 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
name: Build ${{ matrix.directories }}
runs-on: ubuntu-latest
strategy:
matrix:
directories: ['jenkins', 'node18', 'node20', 'php8.1-cli', 'php8.2-cli', 'php8.3-cli', 'aws-cli', 'kamal']
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- id: meta
uses: docker/metadata-action@v5
with:
images: runroom/${{ matrix.directories }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
- uses: docker/build-push-action@v6
with:
push: ${{ github.ref == 'refs/heads/main' }}
context: '{{defaultContext}}:${{ matrix.directories }}'
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max