Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
allmors authored Jul 10, 2024
1 parent e472e7d commit 69a58eb
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker Publish

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Build the Docker image
run: docker build . --file Dockerfile --tag jesmora/hnet-server:$(date +%s)

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Push to Docker Hub
uses: docker/build-push-action@v4
with:
push: true
tags: jesmora/hnet-server:latest

- name: Logout from Docker Hub
run: docker logout

0 comments on commit 69a58eb

Please sign in to comment.