actions: Add arm build
All checks were successful
Build Docker / CheckFiles (push) Successful in 5s
Build Docker / Build Docker (push) Successful in 20s
Build Docker / Build ARM Docker (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2023-09-30 12:48:54 +10:00
parent c45b41677a
commit 6e7799620b
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -46,5 +46,27 @@ jobs:
docker tag woodburn:$tag_num git.woodburn.au/nathanwoodburn/woodburn:latest
docker push git.woodburn.au/nathanwoodburn/woodburn:latest
Build ARM Docker:
runs-on: [ubuntu-latest, arm]
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 woodburn:$tag_num .
docker tag woodburn:$tag_num git.woodburn.au/nathanwoodburn/woodburn:arm
docker push git.woodburn.au/nathanwoodburn/woodburn:arm