2023-07-27 21:59:28 +10:00
|
|
|
name: Build Docker
|
|
|
|
run-name: Build Docker
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
CheckFiles:
|
|
|
|
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 : |
|
2023-07-27 22:19:38 +10:00
|
|
|
cat /etc/os-release
|
2023-07-27 22:22:22 +10:00
|
|
|
sudo apt -y install docker-ce docker-ce-cli containerd.io
|
|
|
|
|
2023-07-27 21:59:28 +10:00
|
|
|
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
|
|
|
|
docker build -t woodburn-website:latest .
|
|
|
|
docker push git.woodburn.au/nathanwoodburn/woodburn-website:latest
|
|
|
|
|
|
|
|
|