From 68e6dfa2b07ec0e0575eb775a7f80118fd88605e Mon Sep 17 00:00:00 2001 From: Keiichiro Amemiya Date: Sun, 20 Dec 2020 22:45:35 -0800 Subject: [PATCH] Initial commit --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ Dockerfile | 7 +++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8d69d43 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: + - main + tags: + - '*.*.*' + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: docker/setup-buildx-action@v1 + - uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.CR_TOKEN }} + - uses: crazy-max/ghaction-docker-meta@v1 + id: docker_meta + with: + images: ghcr.io/hoishin/nginx-certbot + tag-sha: true + - uses: docker/build-push-action@v2 + with: + push: ${{ github.event_name == 'push' }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..432f261 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM nginx:1.19.6-alpine + +RUN apk add --no-cache certbot certbot-nginx +RUN rm -rf /docker-entrypoint.d + +EXPOSE 80/tcp 443/tcp +VOLUME [ "/etc/nginx/nginx.conf" ]