Docker Image CI #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |