mirror of
https://github.com/ZeusWPI/ZNS.git
synced 2024-10-30 13:34:26 +01:00
35 lines
924 B
YAML
35 lines
924 B
YAML
name: Docker main build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/workflows/docker.yml
|
|
- '**/*.rs'
|
|
- Dockerfile
|
|
- Cargo.lock
|
|
|
|
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/zns:${{ github.sha }}
|
|
- name: Tag the new image with latest
|
|
run: docker tag ghcr.io/zeuswpi/zns:${{ github.sha }} ghcr.io/zeuswpi/zns:latest
|
|
- name: Push Docker image
|
|
run: docker push --all-tags ghcr.io/zeuswpi/zns
|