feat: Add auto builds
All checks were successful
Build Docker / Build Docker (push) Successful in 1m13s
All checks were successful
Build Docker / Build Docker (push) Successful in 1m13s
This commit is contained in:
parent
e5b7f7d1e7
commit
019a863e2a
28
.gitea/workflows/build.yml
Normal file
28
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Build Docker
|
||||||
|
run-name: Build Docker Image
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build Docker:
|
||||||
|
runs-on: [ubuntu-latest, arm]
|
||||||
|
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 hip2-server:$tag_num .
|
||||||
|
docker tag hip2-server:$tag_num git.woodburn.au/nathanwoodburn/hip2-server:$tag_num
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hip2-server:$tag_num
|
||||||
|
docker tag hip2-server:$tag_num git.woodburn.au/nathanwoodburn/hip2-server:latest
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hip2-server:latest
|
Loading…
Reference in New Issue
Block a user