From 088e97b1d327af5b73f1111b49a82b9e4f7702ed Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 25 Jan 2025 16:42:27 +1100 Subject: [PATCH] feat: add build workflows --- .gitea/workflows/build.yaml | 25 +++++++++++++++++++++++++ .gitea/workflows/deploy.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 57 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..8a76564 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,25 @@ +name: Build + +on: + pull_request: + +jobs: + build: + runs-on: almalinux-8 + container: + image: git.query.consul/unkin/almalinux9-actionsdind:latest + options: --privileged + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Show changed files + run: | + git diff --name-only master + + - name: Run Packer Builds + env: + VAULT_ROLEID: ${{ secrets.PACKER_BUILDER_VAULT_ROLEID }} + run: | + make diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..b90ff64 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: Deploy + +on: + push: + branches: + - master + +jobs: + build: + runs-on: almalinux-8 + container: + image: git.query.consul/unkin/almalinux8:latest + options: --privileged + + steps: + - name: Set up environment + run: | + dnf install -y yum-utils + yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + dnf module enable -y nodejs:20 + dnf install -y docker-ce-cli make bash git nodejs + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run Packer Builds + env: + VAULT_ROLEID: ${{ secrets.PACKER_BUILDER_VAULT_ROLEID }} + DOCKER_USERNAME: ${{ secrets.UPLOAD_USER }} + DOCKER_PASSWORD: ${{ secrets.UPLOAD_PASS }} + run: | + make