-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.19 KB
/
build-images-edge.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: build-images-edge
concurrency:
cancel-in-progress: true
group: build-images-edge-${{ github.ref }}
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# - image-repo: ${{ github.repository_owner }}/py-spy
# context: ./services/py-spy
- image-repo: ${{ github.repository_owner }}/memory-profiler
context: ./services/memory-profiler
# - image-repo: ${{ github.repository_owner }}/profiler
# context: ./services/profiler
- image-repo: ${{ github.repository_owner }}/restarter
context: ./services/restarter
- image-repo: ${{ github.repository_owner }}/linkerd-proxy-terminator
context: ./services/linkerd-proxy-terminator
- image-repo: ${{ github.repository_owner }}/email-validator
context: ./services/email-validator
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up QEMU needed for Docker
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
logout: false
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
- id: meta
name: Docker metadata
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ matrix.image-repo }}
- id: short-sha
name: Set image tag
run: |
echo "short-sha=$(echo ${{ github.sha }} | cut -c 1-7 )" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.context }}
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: |
${{ env.REGISTRY }}/${{ matrix.image-repo }}:${{ steps.short-sha.outputs.short-sha }}
${{ env.REGISTRY }}/${{ matrix.image-repo }}:latest