Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
IOTech17 authored Sep 10, 2024
1 parent 0b33553 commit 52ad16d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI

on:
schedule:
# Runs every day at 12:00 AM UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allows manual trigger

jobs:
build:
runs-on: ubuntu-latest
environment: dockerhub

steps:
- uses: actions/checkout@v4

- name: Build the Docker image
run: docker build . --file Dockerfile --tag caldera-docker:latest

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Tag the Docker image
run: docker tag phoromatic-server:latest ${{ secrets.DOCKERHUB_USERNAME }}/caldera-docker:latest

- name: Push the Docker image to DockerHub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/caldera-docker:latest

0 comments on commit 52ad16d

Please sign in to comment.