Skip to content

Commit e3d9905

Browse files
authored
ci: multi platform Dockerfile (#2533)
1 parent c8875f8 commit e3d9905

File tree

7 files changed

+526
-442
lines changed

7 files changed

+526
-442
lines changed

.github/workflows/on-master-push.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,59 @@ jobs:
1919
run: npm run compodoc
2020

2121
- name: Deploy on pages
22-
uses: peaceiris/actions-gh-pages@v3
22+
uses: peaceiris/actions-gh-pages@v4
2323
with:
2424
github_token: ${{ secrets.GITHUB_TOKEN }}
2525
publish_dir: doc/compodoc
2626
destination_dir: documentation
2727
force_orphan: true
2828

2929
test:
30-
runs-on: ubuntu-latest
3130
strategy:
3231
fail-fast: false
3332
matrix:
3433
platform:
3534
- linux/amd64
36-
# - linux/arm64 todo use arm64 chrome
35+
- linux/arm64
36+
os:
37+
- ubuntu-latest
38+
- [ self-hosted, Linux, ARM64 ]
39+
exclude:
40+
- platform: linux/arm64
41+
os: ubuntu-latest
42+
- platform: linux/amd64
43+
os: [ self-hosted, Linux, ARM64 ]
44+
runs-on: ${{ matrix.os }}
3745
steps:
3846
- name: Checkout repository files
3947
uses: actions/checkout@v4
4048

41-
- name: Prepare Platform
42-
run: |
43-
platform=${{ matrix.platform }}
44-
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
45-
4649
- name: Set up QEMU
4750
uses: docker/setup-qemu-action@v3
4851

4952
- name: Set up Docker Buildx
5053
uses: docker/setup-buildx-action@v3
5154

52-
- name: Get time of commit
53-
run: echo "TIME=$(git log -1 --pretty=format:%ct)" >> $GITHUB_ENV
55+
- name: Run tests in Docker image
56+
uses: docker/build-push-action@v6
57+
with:
58+
platforms: ${{ matrix.platform }}
59+
context: ./
60+
file: ./build/Dockerfile
61+
builder: ${{ steps.buildx.outputs.name }}
62+
target: test
5463

55-
- name: Run tests and upload coverage
64+
- name: Run tests with timezone
65+
if: ${{ matrix.platform == 'linux/amd64' }}
5666
uses: docker/build-push-action@v6
5767
with:
5868
platforms: ${{ matrix.platform }}
5969
context: ./
6070
file: ./build/Dockerfile
6171
builder: ${{ steps.buildx.outputs.name }}
62-
target: builder
72+
target: test
6373
build-args: |
64-
UPLOAD_COVERAGE=${{ true }}
65-
GIT_COMMIT_SHA=${{ github.sha }}
66-
GIT_BRANCH=master
67-
GIT_COMMITTED_AT=${{ env.TIME }}
68-
CC_TEST_REPORTER_ID=${{ secrets.CODE_CLIMATE_ID }}
69-
BUILD=${{ false }}
74+
TZ=America/Detroit
7075
7176
pre-release:
7277
runs-on: ubuntu-latest

.github/workflows/on-tag-push.yml

Lines changed: 0 additions & 130 deletions
This file was deleted.

.github/workflows/project-management-workflow.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ jobs:
88
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99
steps:
1010
- name: move-assigned-issues-to-column-in-progress
11+
# todo: not maintained anymore, replace this
1112
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
1213
if: github.event_name == 'issues' && github.event.action == 'assigned'
1314
env:
1415
GITHUB_PROJECT_URL: https://github.com/Aam-Digital/ndb-core/projects/6
1516
GITHUB_PROJECT_COLUMN_NAME: In progress
1617
- name: move-unassigned-issues-to-column-todo
18+
# todo: not maintained anymore, replace this
1719
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
1820
if: github.event_name == 'issues' && github.event.action == 'unassigned'
1921
env:
2022
GITHUB_PROJECT_URL: https://github.com/Aam-Digital/ndb-core/projects/6
2123
GITHUB_PROJECT_COLUMN_NAME: To do
2224
- name: add-issues-with-current-milestone-to-project
25+
# todo: not maintained anymore, replace this
2326
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
2427
if: github.event.action == 'milestoned' && github.issue.milestone.html_url == 'https://github.com/Aam-Digital/ndb-core/milestone/19'
2528
env:

.github/workflows/pull-request-closed.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,6 @@ jobs:
3737
3838
- name: Delete github caches for current branch
3939
run: |
40-
echo "Needs debugging"
41-
echo github.base_ref ${{ github.base_ref }}
42-
echo github ${{ github }}
43-
echo github.ref ${{ github.ref }}
44-
echo github.ref_name ${{ github.ref_name }}
45-
echo github.actor ${{ github.actor }}
46-
echo github.triggering_actor ${{ github.triggering_actor }}
47-
echo github.base_ref ${{ github.base_ref }}
48-
echo github.head_ref ${{ github.head_ref }}
49-
echo github.event_name ${{ github.event_name }}
50-
echo github.event ${{ github.event }}
51-
echo github.event.number ${{ github.event.number }}
52-
5340
gh cache list -L 200 --ref "refs/pull/${{ github.event.number }}/merge" --json id --jq '.[] | .id' | while read -r id; do
5441
gh cache delete "$id"
5542
done

0 commit comments

Comments
 (0)