Skip to content

Commit 394d047

Browse files
Merge pull request #3 from solarwinds/docker
Docker images
2 parents 593f6e1 + 6a8f87f commit 394d047

10 files changed

Lines changed: 763 additions & 282 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
2727
container: amazonlinux:2023
2828

29+
permissions:
30+
contents: read
31+
2932
steps:
3033
- run: dnf update -y && dnf install -y git tar gcc pkg-config openssl-devel
3134

@@ -50,6 +53,7 @@ jobs:
5053
arch: [x86_64, aarch64]
5154

5255
permissions:
56+
contents: read
5357
id-token: write
5458

5559
steps:
@@ -76,3 +80,60 @@ jobs:
7680
--output text
7781
)
7882
echo "::notice::$LAYER_ARN"
83+
84+
docker:
85+
needs: build
86+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
87+
strategy:
88+
matrix:
89+
arch: [x86_64, aarch64]
90+
91+
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
92+
93+
permissions:
94+
contents: read
95+
id-token: write
96+
packages: write
97+
98+
steps:
99+
- uses: actions/checkout@v6
100+
- uses: docker/setup-buildx-action@v4
101+
- uses: docker/login-action@v4
102+
with:
103+
registry: ghcr.io
104+
username: ${{ github.repository_owner }}
105+
password: ${{ secrets.GITHUB_TOKEN }}
106+
107+
- uses: actions/download-artifact@v8
108+
with:
109+
name: diet-lambda-${{ matrix.arch }}
110+
111+
- uses: docker/build-push-action@v7
112+
with:
113+
context: .
114+
push: true
115+
tags: ghcr.io/${{ github.repository }}:${{ matrix.arch }}
116+
117+
multiarch:
118+
needs: docker
119+
runs-on: ubuntu-latest
120+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
121+
122+
permissions:
123+
contents: read
124+
id-token: write
125+
packages: write
126+
127+
steps:
128+
- uses: docker/setup-buildx-action@v4
129+
- uses: docker/login-action@v4
130+
with:
131+
registry: ghcr.io
132+
username: ${{ github.repository_owner }}
133+
password: ${{ secrets.GITHUB_TOKEN }}
134+
135+
- run: |
136+
docker buildx imagetools create \
137+
--tag ghcr.io/${{ github.repository }}:latest \
138+
ghcr.io/${{ github.repository }}:x86_64 \
139+
ghcr.io/${{ github.repository }}:aarch64

0 commit comments

Comments
 (0)