Fix workflow conditions
parent
875f158ce2
commit
f65f157230
|
@ -34,7 +34,7 @@ jobs:
|
|||
go run update.go -dockerfiles
|
||||
|
||||
- name: Commit and push changes
|
||||
id: commit_dockerfiles
|
||||
id: commit-dockerfiles
|
||||
run: |
|
||||
git add */*/Dockerfile
|
||||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
||||
|
@ -44,21 +44,21 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Regenerate Bashbrew manifests
|
||||
if: steps.commit_dockerfiles.bumped == 'yes'
|
||||
if: steps.commit-dockerfiles.outputs.bumped == 'yes'
|
||||
run: |
|
||||
go run update.go -manifest -commit $(git log -1 --format='format:%H' HEAD)
|
||||
|
||||
- name: Build on Linux
|
||||
if: steps.commit_dockerfiles.bumped == 'yes'
|
||||
if: steps.commit-dockerfiles.outputs.bumped == 'yes'
|
||||
run: |
|
||||
bashbrew build --pull always caddy
|
||||
|
||||
- name: push
|
||||
if: steps.commit_dockerfiles.bumped == 'yes'
|
||||
if: steps.commit-dockerfiles.outputs.bumped == 'yes'
|
||||
run: |
|
||||
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
bashbrew push caddy
|
||||
|
||||
- name: microbadger
|
||||
if: steps.commit_dockerfiles.bumped == 'yes'
|
||||
if: steps.commit-dockerfiles.outputs.bumped == 'yes'
|
||||
run: curl -X POST https://hooks.microbadger.com/images/productionwentdown/caddy/OVgee2in7ldJ7GgTZiScpwH_mTs=
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
FROM caddy:2.1.1-alpine as build
|
||||
|
||||
RUN apk add --no-cache upx ca-certificates \
|
||||
&& upx --ultra-brute /usr/bin/caddy \
|
||||
&& caddy version
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /etc/caddy/Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --from=build /usr/share/caddy/index.html /usr/share/caddy/index.html
|
||||
COPY --from=build /usr/bin/caddy /usr/bin/caddy
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=build /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
|
||||
ENV XDG_CONFIG_HOME=/config
|
||||
ENV XDG_DATA_HOME=/data
|
||||
ENV HOME=/
|
||||
|
||||
VOLUME /config
|
||||
VOLUME /data
|
||||
|
||||
LABEL org.opencontainers.image.version=v2.1.1
|
||||
LABEL org.opencontainers.image.title="Caddy (productionwentdown build)"
|
||||
LABEL org.opencontainers.image.description="a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go"
|
||||
LABEL org.opencontainers.image.url=https://productionwentdown.makerforce.io
|
||||
LABEL org.opencontainers.image.documentation=https://caddyserver.com/docs
|
||||
LABEL org.opencontainers.image.vendor="productionwentdown"
|
||||
LABEL org.opencontainers.image.licenses=Apache-2.0
|
||||
LABEL org.opencontainers.image.source="https://github.com/productionwentdown/caddy"
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
EXPOSE 2019
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
CMD ["/usr/bin/caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
|
@ -165,5 +165,9 @@ func updateManifest(man *manifest.Manifest2822, gitCommit string) error {
|
|||
entry.GitCommit = gitCommit
|
||||
}
|
||||
manifestPath := path.Join("library", "caddy")
|
||||
err := os.MkdirAll("library", 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(manifestPath, []byte(man.String()), 0644)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue