From e99f9d4131be556507bedd41fa4c281c324148fe Mon Sep 17 00:00:00 2001 From: Michael Thamm <84816828+MichaelThamm@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:25:54 -0400 Subject: [PATCH] Create docker-image.yml action --- .github/workflows/docker-image.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..6585900 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,21 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: | + build_time=$(date +%s) + docker build . -t michaelthamm/website-prod:$build_time + docker run --name website -d -p 5000:5000 michaelthamm/website-prod:$build_time