Skip to content

Commit

Permalink
introduce automated docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
silvadealmeida committed May 15, 2024
1 parent fdf0fab commit d31e1d2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-and-push-dockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build and push bonares-handbook image

on:
push:
branch:
- "retype"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
zalf/bonares-handbook
tags: |
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
file: docker/Dockerfile
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM nginx
COPY . /usr/share/nginx/html

0 comments on commit d31e1d2

Please sign in to comment.