Skip to content

Commit d899da7

Browse files
bricefclaude
andcommitted
Add just docker-push, use justfile for CI Docker steps
Add docker-push recipe with configurable DOCKER_REPO (defaults to "taskflow", overridable via env var). CI now uses just docker-build and just docker-push instead of the docker/build-push-action. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b0fcabd commit d899da7

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333

34-
- name: Set up Docker Buildx
35-
uses: docker/setup-buildx-action@v3
34+
- uses: extractions/setup-just@v2
3635

3736
- name: Log in to Docker Hub
3837
uses: docker/login-action@v3
@@ -41,12 +40,9 @@ jobs:
4140
password: ${{ secrets.DOCKERHUB_TOKEN }}
4241

4342
- name: Build and push
44-
uses: docker/build-push-action@v6
45-
with:
46-
context: .
47-
push: true
48-
tags: |
49-
${{ secrets.DOCKERHUB_USERNAME }}/taskflow:latest
50-
${{ secrets.DOCKERHUB_USERNAME }}/taskflow:${{ github.sha }}
51-
cache-from: type=gha
52-
cache-to: type=gha,mode=max
43+
env:
44+
DOCKER_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/taskflow
45+
run: |
46+
just docker-build
47+
just docker-push latest
48+
just docker-push ${{ github.sha }}

justfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Docker image repository (override with DOCKER_REPO env var or `just --set DOCKER_REPO ...`)
2+
DOCKER_REPO := env("DOCKER_REPO", "taskflow")
3+
14
# Default: list available recipes
25
default:
36
@just --list
@@ -51,6 +54,11 @@ run:
5154
docker-build:
5255
docker build -t taskflow .
5356

57+
# Push Docker image to registry
58+
docker-push tag="latest":
59+
docker tag taskflow {{DOCKER_REPO}}:{{tag}}
60+
docker push {{DOCKER_REPO}}:{{tag}}
61+
5462
# Run with Docker Compose
5563
docker-up:
5664
docker compose up -d

0 commit comments

Comments
 (0)