diff --git a/.github/workflows/cron.json b/.github/workflows/cron.json index 2f978eb..c26297f 100644 --- a/.github/workflows/cron.json +++ b/.github/workflows/cron.json @@ -17,10 +17,11 @@ ], "steps": [{ "name": "compare dockerhub tag and deno latest version", - "run": "! curl -Ls https://registry.hub.docker.com/v2/repositories/dojyorin/deno/tags?page_size=100 | yq '.results[].name' | grep -q ${{needs.fetch.outputs.deno_version}}" + "run": "echo deno_latest=$(! curl -Ls https://registry.hub.docker.com/v2/repositories/dojyorin/deno/tags?page_size=100 | yq '.results[].name' | grep -q ${{needs.fetch.outputs.deno_version}}; echo ${?}) >> ${GITHUB_OUTPUT}" }] }, "test": { + "if": "${{needs.compare.outputs.deno_latest == '1'}}", "uses": "./.github/workflows/_test.yaml", "with": { "deno_version": "${{needs.fetch.outputs.deno_version}}" diff --git a/.github/workflows/cron.yaml b/.github/workflows/cron.yaml index 6cba21c..4e92900 100644 --- a/.github/workflows/cron.yaml +++ b/.github/workflows/cron.yaml @@ -12,8 +12,9 @@ jobs: - fetch steps: - name: compare dockerhub tag and deno latest version - run: '! curl -Ls https://registry.hub.docker.com/v2/repositories/dojyorin/deno/tags?page_size=100 | yq ''.results[].name'' | grep -q ${{needs.fetch.outputs.deno_version}}' + run: echo deno_latest=$(! curl -Ls https://registry.hub.docker.com/v2/repositories/dojyorin/deno/tags?page_size=100 | yq '.results[].name' | grep -q ${{needs.fetch.outputs.deno_version}}; echo ${?}) >> ${GITHUB_OUTPUT} test: + if: ${{needs.compare.outputs.deno_latest == '1'}} uses: ./.github/workflows/_test.yaml with: deno_version: ${{needs.fetch.outputs.deno_version}} diff --git a/LICENSE.md b/LICENSE.md index 1991302..e9a6825 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Kazuki Ota +Copyright (c) 2024 Kazuki Ota Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/alpine.dockerfile b/src/alpine.dockerfile index ada17a3..d22c346 100644 --- a/src/alpine.dockerfile +++ b/src/alpine.dockerfile @@ -3,7 +3,7 @@ FROM alpine:latest AS deno ARG DENO_VERSION RUN apk --update --no-cache add curl -RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - +RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - 'deno' FROM gcr.io/distroless/cc-debian12:latest AS cc diff --git a/src/distroless.dockerfile b/src/distroless.dockerfile index 2dfc9a0..a188871 100644 --- a/src/distroless.dockerfile +++ b/src/distroless.dockerfile @@ -3,7 +3,7 @@ FROM alpine:latest AS deno ARG DENO_VERSION RUN apk --update --no-cache add curl -RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - +RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - 'deno' FROM gcr.io/distroless/cc-debian12:latest AS cc