Skip to content

Commit 5ca8de3

Browse files
committed
slack-thread-expander: linux/amd64
1 parent 1585f5a commit 5ca8de3

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/docker-build-simple.libsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Docker manifest #{name}/Dockerfile
44
// ECR repository: #{name}
55

6-
function(name, region='ap-northeast-1') {
6+
function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
77
name: std.format('docker-%s', name),
88
on: {
99
push: {
@@ -19,8 +19,8 @@ function(name, region='ap-northeast-1') {
1919
name: 'build',
2020
'runs-on': 'ubuntu-latest',
2121
permissions: { 'id-token': 'write', contents: 'read' },
22-
steps: [
23-
{ uses: 'docker/setup-qemu-action@v2' },
22+
steps: [] +
23+
(if std.member(platforms, 'linux/arm64') then [{ uses: 'docker/setup-qemu-action@v2' }] else []) + [
2424
{ uses: 'docker/setup-buildx-action@v2' },
2525
{
2626
uses: 'aws-actions/configure-aws-credentials@v1',
@@ -38,7 +38,7 @@ function(name, region='ap-northeast-1') {
3838
uses: 'docker/build-push-action@v3',
3939
with: {
4040
context: std.format('{{defaultContext}}:%s', name),
41-
platforms: std.join(',', ['linux/arm64']),
41+
platforms: std.join(',', platforms),
4242
tags: std.join(',', [
4343
std.format('${{ steps.login-ecr.outputs.registry }}/%s:${{ github.sha }}', name),
4444
std.format('${{ steps.login-ecr.outputs.registry }}/%s:latest', name),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import './docker-build-simple.libsonnet')('slack-thread-expander', 'us-west-2')
1+
(import './docker-build-simple.libsonnet')('slack-thread-expander', 'us-west-2', ['linux/amd64'])

.github/workflows/docker-slack-thread-expander.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
},
99
"runs-on": "ubuntu-latest",
1010
"steps": [
11-
{
12-
"uses": "docker/setup-qemu-action@v2"
13-
},
1411
{
1512
"uses": "docker/setup-buildx-action@v2"
1613
},
@@ -30,7 +27,7 @@
3027
"uses": "docker/build-push-action@v3",
3128
"with": {
3229
"context": "{{defaultContext}}:slack-thread-expander",
33-
"platforms": "linux/arm64",
30+
"platforms": "linux/amd64",
3431
"push": true,
3532
"tags": "${{ steps.login-ecr.outputs.registry }}/slack-thread-expander:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/slack-thread-expander:latest"
3633
}

0 commit comments

Comments
 (0)