File tree Expand file tree Collapse file tree 3 files changed +106
-18
lines changed Expand file tree Collapse file tree 3 files changed +106
-18
lines changed Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ branches : [main, dev]
6+ tags : ['*']
7+ pull_request :
8+ branches : [main, dev]
9+ workflow_dispatch :
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ defaults :
16+ run :
17+ shell : bash
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Check out the repo
24+ uses : actions/checkout@v5
25+ with :
26+ fetch-tags : true
27+ fetch-depth : 200
28+ filter : blob:none
29+
30+ - name : Log in to Docker Hub
31+ if : github.event_name == 'push'
32+ uses : docker/login-action@v3
33+ with :
34+ username : ${{ secrets.DOCKER_USERNAME }}
35+ password : ${{ secrets.DOCKER_PASSWORD }}
36+
37+ - name : Extract metadata (tags, labels) for Docker
38+ id : meta
39+ uses : docker/metadata-action@v5
40+ with :
41+ images : bids/validator
42+
43+ - name : Build ${{ startsWith(github.ref, 'refs/tags/') && 'and push' || '' }} ${{ steps.meta.outputs.tags }}
44+ uses : docker/build-push-action@v6
45+ with :
46+ context : .
47+ push : ${{ startsWith(github.ref, 'refs/tags/') }}
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
50+
51+ - name : Verify Docker image
52+ run : docker run --rm ${{ steps.meta.outputs.tags }} --version
Original file line number Diff line number Diff line change 1- ARG BASE_IMAGE=denoland/deno:2.0.1
1+ ARG BASE_IMAGE=denoland/deno:alpine-2.4.5
22FROM ${BASE_IMAGE} AS build
33WORKDIR /src
44
5- RUN apt-get update && \
6- apt-get install -y git jq && \
7- apt-get clean && \
8- rm -rf /var/lib/apt/lists/*
5+ RUN apk add --no-cache git jq
96
107ADD . .
118RUN export VERSION=`git -C . -c safe.directory=* describe --tags --always` && \
12- jq -r ".version|=\" $VERSION\" " bids-validator/deno.json > ._deno.json
9+ jq -r ".version|=\" $VERSION\" " deno.json > ._deno.json && \
10+ mv ._deno.json deno.json
1311
14- WORKDIR /src/bids-validator
15- RUN deno cache ./bids-validator-deno
16- RUN ./build.ts
17-
18- FROM ${BASE_IMAGE} AS base
19- WORKDIR /src
20- COPY . .
21- COPY --from=build /src/._deno.json /src/bids-validator/deno.json
22- WORKDIR /src/bids-validator
23- RUN deno cache ./bids-validator-deno
24- ENTRYPOINT ["./bids-validator-deno" ]
12+ RUN deno run -A ./build.ts
2513
2614FROM ${BASE_IMAGE} AS min
2715WORKDIR /src
28- COPY --from=build /src/bids-validator/ dist/validator/* .
16+ COPY --from=build /src/dist/validator/bids-validator.js .
2917
3018ENTRYPOINT ["deno" , "-A" , "./bids-validator.js" ]
Original file line number Diff line number Diff line change 1+ <!--
2+ A new scriv changelog fragment.
3+
4+ Uncomment the section that is right (remove the HTML comment wrapper).
5+ For top level release notes, leave all the headers commented out.
6+ -->
7+
8+ <!--
9+ ### Added
10+
11+ - A bullet item for the Added category.
12+
13+ -->
14+ <!--
15+ ### Changed
16+
17+ - A bullet item for the Changed category.
18+
19+ -->
20+ <!--
21+ ### Fixed
22+
23+ - A bullet item for the Fixed category.
24+
25+ -->
26+ <!--
27+ ### Deprecated
28+
29+ - A bullet item for the Deprecated category.
30+
31+ -->
32+ <!--
33+ ### Removed
34+
35+ - A bullet item for the Removed category.
36+
37+ -->
38+ <!--
39+ ### Security
40+
41+ - A bullet item for the Security category.
42+
43+ -->
44+ ### Infrastructure
45+
46+ - Docker images will once again be pushed to [ bids/validator] [ ] .
47+
48+ [ bids/validator ] : https://hub.docker.com/r/bids/validator/
You can’t perform that action at this time.
0 commit comments