Skip to content

Commit

Permalink
Fix push wf (#4)
Browse files Browse the repository at this point in the history
* reverse exit code.

* update docs.
  • Loading branch information
dojyorin committed Nov 27, 2023
1 parent 38f6825 commit 886c1fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/push.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "push",
"on": {
"schedule": [{
"cron": "0 12 * * *"
"cron": "0 6 * * *"
}]
},
"jobs": {
Expand All @@ -19,13 +19,16 @@
}, {
"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 '\"v\" + .results[].name' | grep -q ${{steps.deno_v.outputs.value}}"
}, {
"if": "${{failure()}}",
"name": "detect latest version - ${{steps.deno_v.outputs.value}}",
"run": "true"
}]
},
"build": {
"name": "build: ${{matrix.distro}}",
"runs-on": "ubuntu-latest",
"needs": "fetch",
"if": "${{failure()}}",
"strategy": {
"fail-fast": true,
"matrix": {
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: push
on:
schedule:
- cron: 0 12 * * *
- cron: 0 6 * * *
jobs:
fetch:
name: 'fetch: deno latest version'
Expand All @@ -14,11 +14,13 @@ jobs:
run: echo value=$(curl -Ls https://api.github.com/repos/denoland/deno/releases/latest | yq '.tag_name') >> ${{github.output}}
- 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 '"v" + .results[].name' | grep -q ${{steps.deno_v.outputs.value}}
- if: ${{failure()}}
name: detect latest version - ${{steps.deno_v.outputs.value}}
run: "true"
build:
name: 'build: ${{matrix.distro}}'
runs-on: ubuntu-latest
needs: fetch
if: ${{failure()}}
strategy:
fail-fast: true
matrix:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The simple and small deno docker image.

This image is published on DockerHub and synchronized with latest version of [denoland/deno](https://github.com/denoland/deno) every day at `12:00` UTC.
This image is published on DockerHub and synchronized with latest version of [denoland/deno](https://github.com/denoland/deno) every day at `06:00` UTC.

- Distroless: [dojyorin/deno:distroless](https://hub.docker.com/r/dojyorin/deno/tags?name=distroless) (default)
- Alpine: [dojyorin/deno:alpine](https://hub.docker.com/r/dojyorin/deno/tags?name=alpine)
Expand All @@ -22,7 +22,7 @@ Easy to introduce in your project.
**As single image**
```sh
# Run REPL.
docker run -it --init --rm denoland/deno:latest
docker run --init --rm -it denoland/deno:latest

# Run script.
docker run --init --rm -p 0.0.0.0:80:8080 -v /project:/project:ro denoland/deno:latest run /project/main.ts
Expand All @@ -33,8 +33,8 @@ docker run --init --rm -p 0.0.0.0:80:8080 -v /project:/project:ro denoland/deno:
name: my_project
services:
image: dojyorin/deno:latest
restart: always
init: true
restart: always
ports:
- 0.0.0.0:80:8000
volumes:
Expand Down

0 comments on commit 886c1fa

Please sign in to comment.