From c82c10dd0a0731b40d01ac97d48c8cea8ae6896d Mon Sep 17 00:00:00 2001 From: deltreey Date: Mon, 22 Apr 2024 14:23:03 -0500 Subject: [PATCH] add build and deploy actions --- .gitea/workflows/build.yaml | 28 ++++++++++++++++++++++++++++ .gitea/workflows/deploy.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..5f3215f --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,28 @@ +name: Build access-web-migration + +on: [push] + +env: + CONTAINER_NAME: pun-app + IMAGE_NAME: 'deltreey/pun-app' + +jobs: + Build-And-Push: + runs-on: docker + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Login + uses: docker/login-action@v3 + with: + registry: gitea.area-51-x.com + username: ${{secrets.DOCKER_USER}} + password: ${{secrets.DOCKER_PASSWORD}} + - uses: mr-smithers-excellent/docker-build-push@v6 + name: Build & push Docker image + with: + image: ${IMAGE_NAME} + tags: latest, ${{gitea.ref_name}}, ${{gitea.run_id}} + registry: gitea.area-51-x.com + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..acabeb7 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,28 @@ +name: Deploy Pun App + +env: + CONTAINER_NAME: pun-app + IMAGE_NAME: 'deltreey/pun-app' + +on: release + +jobs: + Deploy: + runs-on: full + steps: + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "${{secrets.SSH_KEY}}" > ~/.ssh/repo.key + chmod 600 ~/.ssh/repo.key + cat >>~/.ssh/config <