Skip to content

Commit 9286b79

Browse files
authored
fix push. (#17)
* fix push. * fix push arch * change job name.
1 parent 49917c4 commit 9286b79

File tree

6 files changed

+32
-50
lines changed

6 files changed

+32
-50
lines changed

.github/workflows/_fetch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"workflow_call": {
55
"outputs": {
66
"deno_version": {
7-
"value": "${{jobs.fetch.outputs.deno_version}}"
7+
"value": "${{jobs.job.outputs.deno_version}}"
88
}
99
}
1010
}
1111
},
1212
"jobs": {
13-
"fetch": {
14-
"name": "fetch",
13+
"job": {
14+
"name": "deno version",
1515
"runs-on": "ubuntu-latest",
1616
"outputs": {
17-
"deno_version": "${{steps.deno_version.outputs.value}}"
17+
"deno_version": "${{steps.step.outputs.deno_version}}"
1818
},
1919
"steps": [{
20-
"id": "deno_version",
20+
"id": "step",
2121
"name": "get deno latest version",
22-
"run": "echo value=$(curl -Ls https://api.github.com/repos/denoland/deno/releases/latest | yq '.tag_name') >> ${{github.output}}"
22+
"run": "echo deno_version=$(curl -Ls https://api.github.com/repos/denoland/deno/releases/latest | yq '.tag_name') >> ${{github.output}}"
2323
}]
2424
}
2525
}

.github/workflows/_fetch.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ on:
33
workflow_call:
44
outputs:
55
deno_version:
6-
value: ${{jobs.fetch.outputs.deno_version}}
6+
value: ${{jobs.job.outputs.deno_version}}
77
jobs:
8-
fetch:
9-
name: fetch
8+
job:
9+
name: deno version
1010
runs-on: ubuntu-latest
1111
outputs:
12-
deno_version: ${{steps.deno_version.outputs.value}}
12+
deno_version: ${{steps.step.outputs.deno_version}}
1313
steps:
14-
- id: deno_version
14+
- id: step
1515
name: get deno latest version
16-
run: echo value=$(curl -Ls https://api.github.com/repos/denoland/deno/releases/latest | yq '.tag_name') >> ${{github.output}}
16+
run: echo deno_version=$(curl -Ls https://api.github.com/repos/denoland/deno/releases/latest | yq '.tag_name') >> ${{github.output}}

.github/workflows/_push.json

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,18 @@
1111
}
1212
},
1313
"jobs": {
14-
"push": {
15-
"name": "push: ${{matrix.distro}}/${{matrix.arch}}",
14+
"job": {
15+
"name": "${{matrix.os}}",
1616
"runs-on": "ubuntu-latest",
1717
"strategy": {
1818
"fail-fast": true,
1919
"matrix": {
20-
"distro": [
20+
"os": [
2121
"alpine",
2222
"distroless"
23-
],
24-
"arch": [
25-
"amd64",
26-
"arm64"
2723
]
2824
}
2925
},
30-
"env": {
31-
"tag_f": "dojyorin/deno:${{matrix.distro}}-${{inputs.deno_version}}",
32-
"tag_d": "dojyorin/deno:${{matrix.distro}}",
33-
"tag_v": "dojyorin/deno:${{inputs.deno_version}}",
34-
"tag_l": "dojyorin/deno:latest"
35-
},
3626
"steps": [{
3727
"name": "clone repository",
3828
"uses": "actions/checkout@v4"
@@ -53,10 +43,10 @@
5343
"push": true,
5444
"pull": true,
5545
"no-cache": true,
56-
"tags": "${{env.tag_f}},${{env.tag_d}}${{matrix.distro == 'distroless' && format(',{0},{1}', env.tag_v, env.tag_l) || ''}}",
57-
"platforms": "linux/${{matrix.arch}}",
46+
"tags": "${{github.repository_owner}}/deno:${{matrix.os}}-${{inputs.deno_version}},${{github.repository_owner}}/deno:${{matrix.os}},${{matrix.os == 'distroless' && format('{0}/deno:{1},{0}/deno:latest', github.repository_owner, inputs.deno_version) || ''}}",
47+
"platforms": "linux/amd64,linux/arm64",
5848
"context": "{{defaultContext}}:./src",
59-
"file": "${{matrix.distro}}.dockerfile",
49+
"file": "${{matrix.os}}.dockerfile",
6050
"build-args": "DENO_VERSION=${{inputs.deno_version}}"
6151
}
6252
}]

.github/workflows/_push.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,15 @@ on:
66
type: string
77
required: true
88
jobs:
9-
push:
10-
name: 'push: ${{matrix.distro}}/${{matrix.arch}}'
9+
job:
10+
name: ${{matrix.os}}
1111
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
distro:
15+
os:
1616
- alpine
1717
- distroless
18-
arch:
19-
- amd64
20-
- arm64
21-
env:
22-
tag_f: dojyorin/deno:${{matrix.distro}}-${{inputs.deno_version}}
23-
tag_d: dojyorin/deno:${{matrix.distro}}
24-
tag_v: dojyorin/deno:${{inputs.deno_version}}
25-
tag_l: dojyorin/deno:latest
2618
steps:
2719
- name: clone repository
2820
uses: actions/checkout@v4
@@ -39,8 +31,8 @@ jobs:
3931
push: true
4032
pull: true
4133
no-cache: true
42-
tags: ${{env.tag_f}},${{env.tag_d}}${{matrix.distro == 'distroless' && format(',{0},{1}', env.tag_v, env.tag_l) || ''}}
43-
platforms: linux/${{matrix.arch}}
34+
tags: ${{github.repository_owner}}/deno:${{matrix.os}}-${{inputs.deno_version}},${{github.repository_owner}}/deno:${{matrix.os}},${{matrix.os == 'distroless' && format('{0}/deno:{1},{0}/deno:latest', github.repository_owner, inputs.deno_version) || ''}}
35+
platforms: linux/amd64,linux/arm64
4436
context: '{{defaultContext}}:./src'
45-
file: ${{matrix.distro}}.dockerfile
37+
file: ${{matrix.os}}.dockerfile
4638
build-args: DENO_VERSION=${{inputs.deno_version}}

.github/workflows/_test.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
}
1212
},
1313
"jobs": {
14-
"test": {
15-
"name": "test: ${{matrix.distro}}/${{matrix.arch}}",
14+
"job": {
15+
"name": "${{matrix.os}}/${{matrix.arch}}",
1616
"runs-on": "ubuntu-latest",
1717
"strategy": {
1818
"fail-fast": true,
1919
"matrix": {
20-
"distro": [
20+
"os": [
2121
"alpine",
2222
"distroless"
2323
],
@@ -42,7 +42,7 @@
4242
"tags": "${{github.sha}}",
4343
"platforms": "linux/${{matrix.arch}}",
4444
"context": "{{defaultContext}}:./src",
45-
"file": "${{matrix.distro}}.dockerfile",
45+
"file": "${{matrix.os}}.dockerfile",
4646
"build-args": "DENO_VERSION=${{inputs.deno_version}}"
4747
}
4848
}, {

.github/workflows/_test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
type: string
77
required: true
88
jobs:
9-
test:
10-
name: 'test: ${{matrix.distro}}/${{matrix.arch}}'
9+
job:
10+
name: ${{matrix.os}}/${{matrix.arch}}
1111
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
distro:
15+
os:
1616
- alpine
1717
- distroless
1818
arch:
@@ -31,7 +31,7 @@ jobs:
3131
tags: ${{github.sha}}
3232
platforms: linux/${{matrix.arch}}
3333
context: '{{defaultContext}}:./src'
34-
file: ${{matrix.distro}}.dockerfile
34+
file: ${{matrix.os}}.dockerfile
3535
build-args: DENO_VERSION=${{inputs.deno_version}}
3636
- name: test image
3737
run: docker run --rm --init --platform linux/${{matrix.arch}} ${{github.sha}} eval -p 'new Date()'

0 commit comments

Comments
 (0)