Skip to content

Commit

Permalink
add docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Nov 26, 2024
1 parent f2bd719 commit fb90033
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker main build

on:
push:
branches:
- main
pull_request:

concurrency:
group: docker-main
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the new image
run: docker build . -t ghcr.io/zeuswpi/haldis:${{ github.sha }}
- name: Tag the new image with latest
run: docker tag ghcr.io/zeuswpi/haldis:${{ github.sha }} ghcr.io/zeuswpi/haldis:latest
- name: Push Docker image
run: docker push --all-tags ghcr.io/zeuswpi/haldis

0 comments on commit fb90033

Please sign in to comment.