From e7f1e9adc09cb40e9b763a807db3d9ce85cc5850 Mon Sep 17 00:00:00 2001 From: Roland Thomas Date: Sat, 10 Jun 2023 17:02:47 -0400 Subject: [PATCH] Add build action --- .gitea/workflows/build.yml | 23 +++++++++++++++++++++++ Dockerfile | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 .gitea/workflows/build.yml create mode 100644 Dockerfile diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..2c6513b --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,23 @@ +name: rtj.dev Build and Deploy +run-name: Build and Deploy +on: [push] + +jobs: + Build-and-Deploy: + runs-on: docker + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: Pass login information + env: + DOCKER_AUTH_CONFIG: ${{ secrets.DOCKER_AUTH_CONFIG }} + run: | + docker info + mkdir -p $HOME/.docker + echo "$DOCKER_AUTH_CONFIG" > $HOME/.docker/config.json + + - name: Build Docker Image + run: | + docker build -f Dockerfile -t rtj.dev:0.0.1 + docker push rtj.dev:0.0.1 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb8bd7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM klakegg/hugo:ext-alpine-onbuild as hugo + +FROM nginx +COPY --from=hugo /target /usr/share/nginx/html \ No newline at end of file