-
Notifications
You must be signed in to change notification settings - Fork 60
59 lines (52 loc) · 1.82 KB
/
infra.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
name: Build infra images
on:
pull_request:
workflow_dispatch:
jobs:
detect-changes:
uses: ./.github/workflows/detect-changes-matrix.yml
debug-the-things:
needs: detect-changes
runs-on: 'ubuntu-latest'
steps:
- run: |
echo "${{ needs.detect-changes.outputs.infra == 'true' }}"
echo "${{ needs.detect-changes.outputs.infra }}"
echo "${{ needs.detect-changes.outputs }}"
build-infra:
# runs-on: ${{ matrix.platform == 'linux/arm64' && 'macos-13' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
needs: detect-changes
if: ${{ needs.detect-changes.outputs.infra == 'true' }}
steps:
- name: Check out code
uses: actions/checkout@v4
# - name: Setup docker (missing on MacOS)
# if: matrix.platform == 'linux/arm64'
# uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_MACHINE_USER }}
password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
- name: Build Builder Image
uses: docker/build-push-action@v6
with:
context: .
file: ./integrations/_infra/Dockerfile.base.builder
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/port-labs/port-ocean-base-builder:latest
- name: Build Runner Image
uses: docker/build-push-action@v6
with:
context: .
file: ./integrations/_infra/Dockerfile.base.runner
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/port-labs/port-ocean-base-runner:latest