Skip to content

Docker Image CI

Docker Image CI #18

Workflow file for this run

name: Docker Image CI
on:
push:
schedule:
# Runs every day at 12:00 AM UTC
- cron: '0 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 openrport-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 openrport-docker:latest ${{ secrets.DOCKERHUB_USERNAME }}/openrport-docker:latest
- name: Push the Docker image to DockerHub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/openrport-docker:latest