woodburn/.gitea/workflows/build.yml
Nathan Woodburn e569d0859d
Some checks failed
Build Docker / Build Docker (push) Failing after 18s
OnPush / CheckFiles (push) Successful in 6s
docker: Update name
2023-07-27 22:32:08 +10:00

35 lines
1.3 KiB
YAML

name: Build Docker
run-name: Build Docker
on: [push]
jobs:
Build Docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check files
run: |
for file in *.html; do
if grep -q "$file" "$file"; then
echo "File $file contains canonical tag with .html!"
exit 1
else
echo "File $file is correct!"
fi
done
- name: Build Docker image
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
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
docker build -t woodburn:latest .
docker push git.woodburn.au/nathanwoodburn/woodburn:latest