mirror of
https://github.com/docker/metadata-action.git
synced 2026-09-18 11:25:15 +02:00
Compare commits
126
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d38bb2c695 | ||
|
|
bdd9dbab8f | ||
|
|
8e671d84a3 | ||
|
|
a539373280 | ||
|
|
a60f99ff25 | ||
|
|
1c7071ce1e | ||
|
|
78ec08d276 | ||
|
|
00741899ac | ||
|
|
25b012154c | ||
|
|
821a65235e | ||
|
|
0eef5a8fde | ||
|
|
9a3496a831 | ||
|
|
36c0ebbaab | ||
|
|
105ecbec2c | ||
|
|
77a5bf1476 | ||
|
|
d734c39441 | ||
|
|
d1a36161f1 | ||
|
|
2a4bfb6409 | ||
|
|
51af017501 | ||
|
|
85c1a712c2 | ||
|
|
3fd1b59294 | ||
|
|
cefe75597d | ||
|
|
44a747c14e | ||
|
|
334e73ab86 | ||
|
|
a65e287521 | ||
|
|
06076441e4 | ||
|
|
16b2402ae8 | ||
|
|
fe5ae53f8c | ||
|
|
8c322d0993 | ||
|
|
b85971cc18 | ||
|
|
5faed39cb8 | ||
|
|
fa86a8e19a | ||
|
|
818bf39daf | ||
|
|
7e7495626c | ||
|
|
63f5656707 | ||
|
|
8457f1474c | ||
|
|
c1ce55cf4b | ||
|
|
0b24e01e4b | ||
|
|
6630998811 | ||
|
|
721ab41eb2 | ||
|
|
3c48aca360 | ||
|
|
be5123e520 | ||
|
|
5e134fc3cf | ||
|
|
75c1523541 | ||
|
|
31e817f601 | ||
|
|
fd428be62d | ||
|
|
85f67a52da | ||
|
|
d6d4c02fe1 | ||
|
|
703896b4f3 | ||
|
|
1710a9f662 | ||
|
|
0b3ddf66f0 | ||
|
|
02a9d84cbc | ||
|
|
e956db8a87 | ||
|
|
9293eb8a8a | ||
|
|
dc80280410 | ||
|
|
2b9fe830ef | ||
|
|
8128ce30ab | ||
|
|
1d1c89551e | ||
|
|
7f0c2dd4c8 | ||
|
|
025f8c5c81 | ||
|
|
e98d63c308 | ||
|
|
37d9379950 | ||
|
|
a1b8072847 | ||
|
|
e0e338106d | ||
|
|
8740eb24f1 | ||
|
|
829d9deafc | ||
|
|
c6f28b352d | ||
|
|
2538bcf92b | ||
|
|
d90dd465e0 | ||
|
|
25e0734ed4 | ||
|
|
e9f6281329 | ||
|
|
662982e6ad | ||
|
|
8cb42a736d | ||
|
|
a2ac6757c7 | ||
|
|
2f18853aff | ||
|
|
99b992b69c | ||
|
|
f5d3f0bb4f | ||
|
|
ad815f93b1 | ||
|
|
e7c990b5e8 | ||
|
|
41cf1318aa | ||
|
|
4f8aff440c | ||
|
|
2785aeedfc | ||
|
|
860a41aba4 | ||
|
|
23422a030c | ||
|
|
2a674ccb52 | ||
|
|
5185deded3 | ||
|
|
9f63154d50 | ||
|
|
45b1914810 | ||
|
|
d3cc900f2d | ||
|
|
d8b45f9c76 | ||
|
|
020b7354dd | ||
|
|
7f842e879c | ||
|
|
58711ad468 | ||
|
|
7a9d9fefe1 | ||
|
|
3caf19fbe3 | ||
|
|
8016b4facd | ||
|
|
530a407188 | ||
|
|
afa75d4359 | ||
|
|
26a83f6e31 | ||
|
|
585dfe4a50 | ||
|
|
829c7e6ce9 | ||
|
|
246bbe8935 | ||
|
|
ebb6b285fa | ||
|
|
cbc0ced701 | ||
|
|
55d77601d7 | ||
|
|
f25e8d2521 | ||
|
|
8707af5b28 | ||
|
|
f5b5258ae1 | ||
|
|
83fa4edf37 | ||
|
|
c57fc5591a | ||
|
|
9c446bddcb | ||
|
|
9da27ef7f4 | ||
|
|
ba2f556688 | ||
|
|
47ed4f4109 | ||
|
|
e25b2146bd | ||
|
|
a8639b7509 | ||
|
|
4e03f56500 | ||
|
|
620026c7c4 | ||
|
|
17e943b674 | ||
|
|
da0e8cb6fa | ||
|
|
62878a8cd8 | ||
|
|
7fff4a866b | ||
|
|
80c12fa72e | ||
|
|
cb88e1e24e | ||
|
|
8904ec6ac8 | ||
|
|
133aa67758 |
@@ -10,6 +10,9 @@ updates:
|
|||||||
crazy-max-dot-github:
|
crazy-max-dot-github:
|
||||||
patterns:
|
patterns:
|
||||||
- "crazy-max/.github/*"
|
- "crazy-max/.github/*"
|
||||||
|
codeql-actions:
|
||||||
|
patterns:
|
||||||
|
- "github/codeql-action/*"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
- "bot"
|
- "bot"
|
||||||
|
|||||||
+43
-43
@@ -34,7 +34,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -46,10 +46,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -83,10 +83,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -119,10 +119,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -153,10 +153,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -184,10 +184,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -207,10 +207,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -228,10 +228,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -258,10 +258,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -288,10 +288,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -323,10 +323,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
@@ -348,7 +348,7 @@ jobs:
|
|||||||
type=sha
|
type=sha
|
||||||
-
|
-
|
||||||
name: Build and push to local registry
|
name: Build and push to local registry
|
||||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: ./test
|
context: ./test
|
||||||
file: ./test/Dockerfile
|
file: ./test/Dockerfile
|
||||||
@@ -371,10 +371,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
-
|
-
|
||||||
@@ -396,7 +396,7 @@ jobs:
|
|||||||
type=sha
|
type=sha
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
./test/docker-bake.hcl
|
./test/docker-bake.hcl
|
||||||
@@ -416,10 +416,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -444,10 +444,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -465,7 +465,7 @@ jobs:
|
|||||||
maintainer=Foo
|
maintainer=Foo
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: ./test
|
context: ./test
|
||||||
file: ./test/output.Dockerfile
|
file: ./test/output.Dockerfile
|
||||||
@@ -483,7 +483,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@@ -507,10 +507,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
-
|
-
|
||||||
@@ -534,7 +534,7 @@ jobs:
|
|||||||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
./test/docker-bake.hcl
|
./test/docker-bake.hcl
|
||||||
@@ -548,10 +548,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -574,10 +574,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
-
|
-
|
||||||
@@ -586,7 +586,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
source: .
|
source: .
|
||||||
files: |
|
files: |
|
||||||
@@ -607,10 +607,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
version: ${{ env.BUILDX_VERSION }}
|
||||||
driver: docker
|
driver: docker
|
||||||
@@ -631,7 +631,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Dump context
|
name: Dump context
|
||||||
uses: crazy-max/ghaction-dump-context@5d2753e7076f4568c7729971e25231f32147e2d8 # v3.0.0
|
uses: crazy-max/ghaction-dump-context@4d9eeaf15dd59aa4346919ea84a84ccf514b4db8 # v3.1.0
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Enable corepack
|
name: Enable corepack
|
||||||
run: |
|
run: |
|
||||||
@@ -30,17 +30,17 @@ jobs:
|
|||||||
yarn --version
|
yarn --version
|
||||||
-
|
-
|
||||||
name: Set up Node
|
name: Set up Node
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
-
|
-
|
||||||
name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
||||||
with:
|
with:
|
||||||
languages: javascript-typescript
|
languages: javascript-typescript
|
||||||
build-mode: none
|
build-mode: none
|
||||||
-
|
-
|
||||||
name: Perform CodeQL Analysis
|
name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
||||||
with:
|
with:
|
||||||
category: "/language:javascript-typescript"
|
category: "/language:javascript-typescript"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
|
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Publish
|
name: Publish
|
||||||
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
|
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
source: .
|
source: .
|
||||||
targets: test
|
targets: test
|
||||||
-
|
-
|
||||||
name: Upload coverage
|
name: Upload coverage
|
||||||
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
|
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
with:
|
with:
|
||||||
files: ./coverage/clover.xml
|
files: ./coverage/clover.xml
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ jobs:
|
|||||||
permission-contents: write
|
permission-contents: write
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ steps.docker-read-app.outputs.token }}
|
token: ${{ steps.docker-read-app.outputs.token }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
source: .
|
source: .
|
||||||
targets: build
|
targets: build
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git add dist
|
git add dist
|
||||||
git commit -m "chore: update generated content"
|
git commit -m "[dependabot skip] chore: update generated content"
|
||||||
git push
|
git push
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Generate matrix
|
name: Generate matrix
|
||||||
id: generate
|
id: generate
|
||||||
uses: docker/bake-action/subaction/matrix@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action/subaction/matrix@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
target: validate
|
target: validate
|
||||||
|
|
||||||
@@ -41,6 +41,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Validate
|
name: Validate
|
||||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
zizmor:
|
zizmor:
|
||||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
|
uses: crazy-max/.github/.github/workflows/zizmor.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|||||||
+11
-4
@@ -1,10 +1,10 @@
|
|||||||
# https://yarnpkg.com/configuration/yarnrc
|
# https://yarnpkg.com/configuration/yarnrc
|
||||||
|
|
||||||
compressionLevel: mixed
|
nodeLinker: node-modules
|
||||||
enableGlobalCache: false
|
|
||||||
enableHardenedMode: true
|
|
||||||
|
|
||||||
logFilters:
|
logFilters:
|
||||||
|
- code: YN0004
|
||||||
|
level: discard
|
||||||
- code: YN0013
|
- code: YN0013
|
||||||
level: discard
|
level: discard
|
||||||
- code: YN0019
|
- code: YN0019
|
||||||
@@ -14,4 +14,11 @@ logFilters:
|
|||||||
- code: YN0086
|
- code: YN0086
|
||||||
level: discard
|
level: discard
|
||||||
|
|
||||||
nodeLinker: node-modules
|
npmPreapprovedPackages:
|
||||||
|
- "@docker/actions-toolkit"
|
||||||
|
|
||||||
|
compressionLevel: mixed
|
||||||
|
enableGlobalCache: false
|
||||||
|
enableHardenedMode: true
|
||||||
|
enableScripts: false
|
||||||
|
npmMinimalAgeGate: 2d
|
||||||
|
|||||||
@@ -286,8 +286,8 @@ The following inputs can be used as `step.with` keys:
|
|||||||
> ```
|
> ```
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|-------------------|--------|------------------------------------------------------------------------------|
|
|-------------------|--------|--------------------------------------------------------------------------------------------|
|
||||||
| `context` | String | Where to get context data. Allowed options are: `workflow` (default), `git`. |
|
| `context` | String | Where to get context data. Allowed options are: `workflow` (default), `git`, `git:<path>`. |
|
||||||
| `images` | List | List of Docker images to use as base name for tags |
|
| `images` | List | List of Docker images to use as base name for tags |
|
||||||
| `tags` | List | List of [tags](#tags-input) as key-value pair attributes |
|
| `tags` | List | List of [tags](#tags-input) as key-value pair attributes |
|
||||||
| `flavor` | List | [Flavor](#flavor-input) to apply |
|
| `flavor` | List | [Flavor](#flavor-input) to apply |
|
||||||
@@ -357,6 +357,24 @@ context: git
|
|||||||
* `workflow`: Get context metadata from the workflow (GitHub context). See https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
|
* `workflow`: Get context metadata from the workflow (GitHub context). See https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
|
||||||
* `git`: Get context metadata from the workflow and overrides some of them with current Git context, such as `ref` and `sha`.
|
* `git`: Get context metadata from the workflow and overrides some of them with current Git context, such as `ref` and `sha`.
|
||||||
|
|
||||||
|
Use `context: git:<path>` when the repository is checked out to a custom path.
|
||||||
|
The path can be absolute or relative to the current working directory
|
||||||
|
(normally `$GITHUB_WORKSPACE`):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: source
|
||||||
|
- uses: docker/metadata-action@v6
|
||||||
|
with:
|
||||||
|
context: git:source
|
||||||
|
images: name/app
|
||||||
|
tags: type=sha
|
||||||
|
```
|
||||||
|
|
||||||
|
The selected checkout supplies the Git ref, SHA, and commit date. Other repository
|
||||||
|
metadata still comes from the workflow repository.
|
||||||
|
|
||||||
## `images` input
|
## `images` input
|
||||||
|
|
||||||
`images` defines a list of Docker images to use as base name for [`tags`](#tags-input):
|
`images` defines a list of Docker images to use as base name for [`tags`](#tags-input):
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import {beforeEach, describe, expect, test, it, vi} from 'vitest';
|
import {afterEach, beforeEach, describe, expect, test, it, vi} from 'vitest';
|
||||||
|
import {execFileSync} from 'child_process';
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
import {Git} from '@docker/actions-toolkit/lib/git.js';
|
import {Git} from '@docker/actions-toolkit/lib/git.js';
|
||||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
|
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
|
||||||
|
|
||||||
import * as context from '../src/context.js';
|
import * as context from '../src/context.js';
|
||||||
|
import {Meta} from '../src/meta.js';
|
||||||
|
import repoFixture from './fixtures/repo.json' with {type: 'json'};
|
||||||
|
|
||||||
const toolkit = new Toolkit({githubToken: 'fake-github-token'});
|
const toolkit = new Toolkit({githubToken: 'fake-github-token'});
|
||||||
|
|
||||||
@@ -16,6 +22,11 @@ describe('getInputs', () => {
|
|||||||
}, {});
|
}, {});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('reads a Git context with a path', () => {
|
||||||
|
setInput('context', 'git:nested checkout');
|
||||||
|
expect(context.getInputs().context).toEqual('git:nested checkout');
|
||||||
|
});
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const cases: [number, Map<string, string>, context.Inputs][] = [
|
const cases: [number, Map<string, string>, context.Inputs][] = [
|
||||||
[
|
[
|
||||||
@@ -151,13 +162,26 @@ describe('getInputs', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('getContext', () => {
|
describe('getContext', () => {
|
||||||
it('workflow', async () => {
|
afterEach(() => {
|
||||||
|
vi.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('workflow does not read Git context', async () => {
|
||||||
|
const gitContext = vi.spyOn(Git, 'context');
|
||||||
|
const gitCommitDate = vi.spyOn(Git, 'commitDate');
|
||||||
const ctx = await context.getContext(context.ContextSource.workflow, toolkit);
|
const ctx = await context.getContext(context.ContextSource.workflow, toolkit);
|
||||||
expect(ctx.ref).toEqual('refs/heads/dev');
|
expect(ctx.ref).toEqual('refs/heads/dev');
|
||||||
expect(ctx.sha).toEqual('5f3331d7f7044c18ca9f12c77d961c4d7cf3276a');
|
expect(ctx.sha).toEqual('5f3331d7f7044c18ca9f12c77d961c4d7cf3276a');
|
||||||
expect(ctx.commitDate).toEqual(new Date('2024-11-13T13:42:28.000Z'));
|
expect(ctx.commitDate).toEqual(new Date('2024-11-13T13:42:28.000Z'));
|
||||||
|
expect(gitContext).not.toHaveBeenCalled();
|
||||||
|
expect(gitCommitDate).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
it('git', async () => {
|
it.each<[string, string | undefined]>([
|
||||||
|
['git', undefined],
|
||||||
|
['git:', ''],
|
||||||
|
['git:source', 'source'],
|
||||||
|
['git:C:\\nested checkout', 'C:\\nested checkout']
|
||||||
|
])('reads %s', async (source, workdir) => {
|
||||||
vi.spyOn(Git, 'context').mockImplementation((): Promise<context.Context> => {
|
vi.spyOn(Git, 'context').mockImplementation((): Promise<context.Context> => {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
ref: 'refs/heads/git-test',
|
ref: 'refs/heads/git-test',
|
||||||
@@ -167,11 +191,51 @@ describe('getContext', () => {
|
|||||||
vi.spyOn(Git, 'commitDate').mockImplementation(async (): Promise<Date> => {
|
vi.spyOn(Git, 'commitDate').mockImplementation(async (): Promise<Date> => {
|
||||||
return new Date('2023-01-01T13:42:28.000Z');
|
return new Date('2023-01-01T13:42:28.000Z');
|
||||||
});
|
});
|
||||||
const ctx = await context.getContext(context.ContextSource.git, toolkit);
|
const ctx = await context.getContext(source, toolkit);
|
||||||
|
expect(Git.context).toHaveBeenCalledWith(workdir);
|
||||||
|
expect(Git.commitDate).toHaveBeenCalledWith('git-test-sha', workdir);
|
||||||
expect(ctx.ref).toEqual('refs/heads/git-test');
|
expect(ctx.ref).toEqual('refs/heads/git-test');
|
||||||
expect(ctx.sha).toEqual('git-test-sha');
|
expect(ctx.sha).toEqual('git-test-sha');
|
||||||
expect(ctx.commitDate).toEqual(new Date('2023-01-01T13:42:28.000Z'));
|
expect(ctx.commitDate).toEqual(new Date('2023-01-01T13:42:28.000Z'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each(['workflow:source', 'gitfoo:source', 'invalid'])('rejects invalid context %s', async source => {
|
||||||
|
await expect(context.getContext(source, toolkit)).rejects.toThrow(`Invalid context source: ${source}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(['relative', 'absolute'])('reads a selected checkout using a %s path', async pathType => {
|
||||||
|
const checkoutDir = fs.mkdtempSync(path.join(process.cwd(), 'git context-'));
|
||||||
|
const workdir = pathType === 'relative' ? path.relative(process.cwd(), checkoutDir) : checkoutDir;
|
||||||
|
const commitDate = '2024-01-02T03:04:05Z';
|
||||||
|
const git = (args: string[]) =>
|
||||||
|
execFileSync('git', args, {
|
||||||
|
cwd: checkoutDir,
|
||||||
|
encoding: 'utf8',
|
||||||
|
stdio: 'pipe',
|
||||||
|
env: {...process.env, GIT_AUTHOR_DATE: commitDate, GIT_COMMITTER_DATE: commitDate}
|
||||||
|
}).trim();
|
||||||
|
|
||||||
|
try {
|
||||||
|
git(['init', '--initial-branch=selected-checkout']);
|
||||||
|
git(['-c', 'user.name=Test', '-c', 'user.email=test@example.com', '-c', 'commit.gpgsign=false', 'commit', '--allow-empty', '-m', 'initial']);
|
||||||
|
const sha = git(['rev-parse', 'HEAD']);
|
||||||
|
const ctx = await context.getContext(`git:${workdir}`, toolkit);
|
||||||
|
expect(ctx.ref).toEqual('refs/heads/selected-checkout');
|
||||||
|
expect(ctx.sha).toEqual(sha);
|
||||||
|
expect(ctx.commitDate).toEqual(new Date(commitDate));
|
||||||
|
|
||||||
|
git(['checkout', '--detach', 'HEAD']);
|
||||||
|
git(['branch', '-D', 'selected-checkout']);
|
||||||
|
const detachedContext = await context.getContext(`git:${workdir}`, toolkit);
|
||||||
|
expect(detachedContext.ref).toEqual('');
|
||||||
|
expect(detachedContext.sha).toEqual(sha);
|
||||||
|
expect(detachedContext.commitDate).toEqual(new Date(commitDate));
|
||||||
|
const meta = new Meta({...context.getInputs(), images: ['name/app'], tags: ['type=sha,format=long'], flavor: []}, detachedContext, repoFixture);
|
||||||
|
expect(meta.getTags()).toEqual([`name/app:sha-${sha}`]);
|
||||||
|
} finally {
|
||||||
|
fs.rmSync(checkoutDir, {recursive: true, force: true});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
||||||
|
|||||||
@@ -72,11 +72,14 @@
|
|||||||
"homepage": "https://github.com",
|
"homepage": "https://github.com",
|
||||||
"language": null,
|
"language": null,
|
||||||
"forks_count": 9,
|
"forks_count": 9,
|
||||||
|
"forks": 9,
|
||||||
"stargazers_count": 80,
|
"stargazers_count": 80,
|
||||||
"watchers_count": 80,
|
"watchers_count": 80,
|
||||||
|
"watchers": 80,
|
||||||
"size": 108,
|
"size": 108,
|
||||||
"default_branch": "master",
|
"default_branch": "master",
|
||||||
"open_issues_count": 0,
|
"open_issues_count": 0,
|
||||||
|
"open_issues": 0,
|
||||||
"is_template": true,
|
"is_template": true,
|
||||||
"topics": [
|
"topics": [
|
||||||
"octocat",
|
"octocat",
|
||||||
@@ -85,6 +88,7 @@
|
|||||||
"api"
|
"api"
|
||||||
],
|
],
|
||||||
"has_issues": true,
|
"has_issues": true,
|
||||||
|
"has_discussions": false,
|
||||||
"has_projects": true,
|
"has_projects": true,
|
||||||
"has_wiki": true,
|
"has_wiki": true,
|
||||||
"has_pages": false,
|
"has_pages": false,
|
||||||
@@ -211,11 +215,15 @@
|
|||||||
"homepage": "https://github.com",
|
"homepage": "https://github.com",
|
||||||
"language": null,
|
"language": null,
|
||||||
"forks_count": 9,
|
"forks_count": 9,
|
||||||
|
"forks": 9,
|
||||||
|
"license": null,
|
||||||
"stargazers_count": 80,
|
"stargazers_count": 80,
|
||||||
"watchers_count": 80,
|
"watchers_count": 80,
|
||||||
|
"watchers": 80,
|
||||||
"size": 108,
|
"size": 108,
|
||||||
"default_branch": "master",
|
"default_branch": "master",
|
||||||
"open_issues_count": 0,
|
"open_issues_count": 0,
|
||||||
|
"open_issues": 0,
|
||||||
"is_template": true,
|
"is_template": true,
|
||||||
"topics": [
|
"topics": [
|
||||||
"octocat",
|
"octocat",
|
||||||
@@ -322,11 +330,15 @@
|
|||||||
"homepage": "https://github.com",
|
"homepage": "https://github.com",
|
||||||
"language": null,
|
"language": null,
|
||||||
"forks_count": 9,
|
"forks_count": 9,
|
||||||
|
"forks": 9,
|
||||||
|
"license": null,
|
||||||
"stargazers_count": 80,
|
"stargazers_count": 80,
|
||||||
"watchers_count": 80,
|
"watchers_count": 80,
|
||||||
|
"watchers": 80,
|
||||||
"size": 108,
|
"size": 108,
|
||||||
"default_branch": "master",
|
"default_branch": "master",
|
||||||
"open_issues_count": 0,
|
"open_issues_count": 0,
|
||||||
|
"open_issues": 0,
|
||||||
"is_template": true,
|
"is_template": true,
|
||||||
"topics": [
|
"topics": [
|
||||||
"octocat",
|
"octocat",
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ branding:
|
|||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
context:
|
context:
|
||||||
description: 'Where to get context data. Allowed options are "workflow" (default), "git".'
|
description: 'Where to get context data. Allowed options are "workflow" (default), "git", "git:<path>".'
|
||||||
default: "workflow"
|
default: "workflow"
|
||||||
required: true
|
required: true
|
||||||
images:
|
images:
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ FROM base AS deps
|
|||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
yarn install --immutable && mkdir /vendor && cp yarn.lock /vendor
|
||||||
|
|
||||||
FROM scratch AS vendor-update
|
FROM scratch AS vendor-update
|
||||||
COPY --from=deps /vendor /
|
COPY --from=deps /vendor /
|
||||||
|
|||||||
+137
-201
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+65
-688
File diff suppressed because it is too large
Load Diff
+9
-9
@@ -4,7 +4,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify && yarn run license",
|
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify --keep-names && yarn run license",
|
||||||
"lint": "eslint --max-warnings=0 .",
|
"lint": "eslint --max-warnings=0 .",
|
||||||
"format": "eslint --fix .",
|
"format": "eslint --fix .",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
@@ -23,17 +23,17 @@
|
|||||||
],
|
],
|
||||||
"author": "Docker Inc.",
|
"author": "Docker Inc.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"packageManager": "yarn@4.9.2",
|
"packageManager": "yarn@4.15.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^3.0.0",
|
"@actions/core": "^3.0.1",
|
||||||
"@actions/github": "^9.0.0",
|
"@actions/github": "^9.1.1",
|
||||||
"@docker/actions-toolkit": "^0.90.0",
|
"@docker/actions-toolkit": "^0.100.0",
|
||||||
"@renovate/pep440": "^1.0.0",
|
"@renovate/pep440": "^1.0.0",
|
||||||
"csv-parse": "^6.2.1",
|
"csv-parse": "^7.0.2",
|
||||||
"handlebars": "^4.7.9",
|
"handlebars": "^4.7.9",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.31.0",
|
||||||
"moment-timezone": "^0.6.1",
|
"moment-timezone": "^0.6.3",
|
||||||
"semver": "^7.7.4"
|
"semver": "^7.8.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.39.3",
|
"@eslint/js": "^9.39.3",
|
||||||
|
|||||||
+9
-6
@@ -12,7 +12,7 @@ export interface Context extends GithubContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Inputs {
|
export interface Inputs {
|
||||||
context: ContextSource;
|
context: string;
|
||||||
images: string[];
|
images: string[];
|
||||||
tags: string[];
|
tags: string[];
|
||||||
flavor: string[];
|
flavor: string[];
|
||||||
@@ -27,7 +27,7 @@ export interface Inputs {
|
|||||||
|
|
||||||
export function getInputs(): Inputs {
|
export function getInputs(): Inputs {
|
||||||
return {
|
return {
|
||||||
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
|
context: core.getInput('context') || ContextSource.workflow,
|
||||||
images: Util.getInputList('images', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
images: Util.getInputList('images', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
||||||
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
||||||
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#', commentNoInfix: true}),
|
||||||
@@ -46,7 +46,10 @@ export enum ContextSource {
|
|||||||
git = 'git'
|
git = 'git'
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getContext(source: ContextSource, toolkit: Toolkit): Promise<Context> {
|
export async function getContext(source: string, toolkit: Toolkit): Promise<Context> {
|
||||||
|
if (source.startsWith(`${ContextSource.git}:`)) {
|
||||||
|
return await getContextFromGit(source.slice(ContextSource.git.length + 1));
|
||||||
|
}
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case ContextSource.workflow:
|
case ContextSource.workflow:
|
||||||
return await getContextFromWorkflow(toolkit);
|
return await getContextFromWorkflow(toolkit);
|
||||||
@@ -82,11 +85,11 @@ async function getContextFromWorkflow(toolkit: Toolkit): Promise<Context> {
|
|||||||
} as Context;
|
} as Context;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContextFromGit(): Promise<Context> {
|
async function getContextFromGit(workdir?: string): Promise<Context> {
|
||||||
const ctx = await Git.context();
|
const ctx = await Git.context(workdir);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commitDate: await Git.commitDate(ctx.sha),
|
commitDate: await Git.commitDate(ctx.sha, workdir),
|
||||||
...ctx
|
...ctx
|
||||||
} as Context;
|
} as Context;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user