Skip to content

Commit

Permalink
Add docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mraron committed Aug 26, 2024
1 parent 645ab56 commit 75660a5
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Docker Images

on:
push:
branches:
- docker
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

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

- name: Build and push frontend Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/njudge:latest

- name: Logout from Docker Hub
run: docker logout

0 comments on commit 75660a5

Please sign in to comment.