feat: Add AMD build
This commit is contained in:
parent
6ff40bff0e
commit
41cafd1a95
@ -9,7 +9,7 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build Master:
|
Build_Master_ARM:
|
||||||
runs-on: [ubuntu-latest, arm]
|
runs-on: [ubuntu-latest, arm]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -40,6 +40,43 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
docker build -t hnshosting-master:$tag_num .
|
||||||
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num-arm
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num-arm
|
||||||
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag-arm
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag-arm
|
||||||
|
|
||||||
|
Build_Master_AMD:
|
||||||
|
runs-on: [ubuntu-latest, amd]
|
||||||
|
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 : |
|
||||||
|
cd master
|
||||||
|
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
|
||||||
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
|
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
|
||||||
|
tag=${tag//\//-}
|
||||||
|
tag_num=${GITHUB_RUN_NUMBER}
|
||||||
|
echo "tag_num=$tag_num"
|
||||||
|
|
||||||
|
if [[ "$tag" == "main" ]]; then
|
||||||
|
tag="latest"
|
||||||
|
else
|
||||||
|
tag_num="${tag}-${tag_num}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
docker build -t hnshosting-master:$tag_num .
|
docker build -t hnshosting-master:$tag_num .
|
||||||
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
||||||
@ -48,9 +85,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build_Bot_ARM:
|
||||||
|
|
||||||
Build Bot:
|
|
||||||
runs-on: [ubuntu-latest, arm]
|
runs-on: [ubuntu-latest, arm]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -78,6 +113,39 @@ jobs:
|
|||||||
tag_num="${tag}-${tag_num}"
|
tag_num="${tag}-${tag_num}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
docker build -t hnshosting-bot:$tag_num .
|
||||||
|
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num-arm
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num-arm
|
||||||
|
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag-arm
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag-arm
|
||||||
|
Build_Bot_AMD:
|
||||||
|
runs-on: [ubuntu-latest, amd]
|
||||||
|
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 : |
|
||||||
|
cd discord-bot
|
||||||
|
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
|
||||||
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
|
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
|
||||||
|
tag=${tag//\//-}
|
||||||
|
tag_num=${GITHUB_RUN_NUMBER}
|
||||||
|
if [[ "$tag" == "main" ]]; then
|
||||||
|
tag="latest"
|
||||||
|
else
|
||||||
|
tag_num="${tag}-${tag_num}"
|
||||||
|
fi
|
||||||
|
|
||||||
docker build -t hnshosting-bot:$tag_num .
|
docker build -t hnshosting-bot:$tag_num .
|
||||||
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
||||||
|
Loading…
Reference in New Issue
Block a user