File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build Docker image and push to GitHub Container Registry
2+ on : [push]
3+
4+ jobs :
5+ build :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v1
9+ - name : Publish to GitHub Package Registry
10+ uses : elgohr/Publish-Docker-Github-Action@master
11+ with :
12+ name : vtluug/site
13+ username : vtluug
14+ password : ${{ secrets.GITHUB_TOKEN }}
15+ registry : ghcr.io
16+ tag_names : true
Original file line number Diff line number Diff line change 1+ FROM nginx:alpine
2+
3+ RUN apk add --no-cache git busybox
4+
5+ # shithack. i'm lazy. ~rsk
6+ RUN rm -rf /usr/share/nginx/html/*
7+ RUN git clone https://github.com/vtluug/vtluug.github.io /usr/share/nginx/html
8+ RUN git config --global --add safe.directory /usr/share/nginx/html
9+ RUN chown -R nginx:nginx /usr/share/nginx/html
10+
11+ # gh doesn't ratelimit
12+ RUN echo "* * * * * git -C /usr/share/nginx/html pull origin master >> /var/log/pull 2>&1" >> /etc/crontabs/root
13+
14+ EXPOSE 80
15+ CMD ["sh" , "-c" , "crond -b -L /var/log/cron && nginx -g 'daemon off;'" ]
You can’t perform that action at this time.
0 commit comments