-
Notifications
You must be signed in to change notification settings - Fork 12
53 lines (51 loc) · 1.62 KB
/
main.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
---
name: main
on:
push:
branches-ignore:
- release
pull_request:
branches-ignore:
- release
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
continue-on-error: ${{ matrix.build_cmd != './build-latest.sh' }}
strategy:
matrix:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build.sh main
os:
- ubuntu-latest
- self-hosted
fail-fast: false
env:
GH_ACTION: enable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_NAMES: docker.io/peeringmanager/peering-manager
runs-on: ${{ matrix.os }}
name: Build new Peering Manager Docker images
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx-setup
uses: docker/setup-buildx-action@v3
- name: Set BUILDX_PLATFORM to ARM64
if: matrix.os == 'self-hosted'
run: echo "BUILDX_PLATFORM=linux/arm64" >>"${GITHUB_ENV}"
- name: Build the image for '${{ matrix.os }}' with '${{ matrix.build_cmd }}'
id: docker-build
run: ${{ matrix.build_cmd }}
env:
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
- name: Set Peering Manager container start_period higher on ARM64
if: matrix.os == 'self-hosted'
run: echo "PEERINGMANAGER_START_PERIOD=240s" >>"${GITHUB_ENV}"
- name: Test the image
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
if: steps.docker-build.outputs.skipped != 'true'