slim images, pushing to docker hub from github

This commit is contained in:
Andy Pack 2023-05-16 17:51:28 +01:00
parent 1c8adf660a
commit 5f88d7a0f6
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
3 changed files with 33 additions and 2 deletions

View File

@ -1 +1,4 @@
public public
.git
.github
.jenkins

View File

@ -60,6 +60,34 @@ jobs:
with: with:
path: ./public path: ./public
package:
runs-on: ubuntu-latest
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build CLI Container
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
tags: sarsoo/sarsooxyz.hugo:latest
# Deployment job # Deployment job
deploy: deploy:
environment: environment:

View File

@ -7,5 +7,5 @@ RUN hugo \
--minify \ --minify \
--baseURL https://sarsoo.xyz/ --baseURL https://sarsoo.xyz/
FROM nginx FROM nginx:alpine-slim
COPY --from=build /sarsooxyz.hugo/public /usr/share/nginx/html/ COPY --from=build /sarsooxyz.hugo/public /usr/share/nginx/html/