From 7695495631ab441a609f339f35f1f38d0e20a629 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 31 Jul 2023 11:24:44 +1000 Subject: [PATCH] actions: Added initial build --- .gitea/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..c4553d7 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build Docker +run-name: Build Docker Image +on: [push] + +jobs: + Build Docker: + runs-on: ubuntu-latest + needs: CheckFiles + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Docker + run : | + apt-get install ca-certificates curl gnupg + install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + chmod a+r /etc/apt/keyrings/docker.gpg + echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update + apt-get install docker-ce-cli -y + - name: Build Docker image + run : | + echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin + tag_num=$(git rev-parse --short HEAD) + docker build -t firewallet_site:$tag_num . + docker tag firewallet_site:$tag_num git.woodburn.au/nathanwoodburn/firewallet_site:$tag_num + docker push git.woodburn.au/nathanwoodburn/firewallet_site:$tag_num + docker tag firewallet_site:$tag_num git.woodburn.au/nathanwoodburn/firewallet_site:latest + docker push git.woodburn.au/nathanwoodburn/firewallet_site:latest + + +