7
7
branches :
8
8
- main
9
9
10
- env :
11
- IMAGE_NAME : fogapod/pink
12
-
13
10
jobs :
14
11
lint :
15
12
env :
@@ -33,11 +30,11 @@ jobs:
33
30
key : pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
34
31
- uses : actions/checkout@v4
35
32
- name : Set up uv
36
- run : curl -LsSf https://astral.sh/uv/0.3.3 /install.sh | sh
33
+ run : curl -LsSf https://astral.sh/uv/0.3.5 /install.sh | sh
37
34
- name : Set up Python
38
35
run : uv python install
39
- - name : install mypy
40
- run : uv sync --dev
36
+ - name : install dependencies
37
+ run : uv sync
41
38
- name : pre-commit
42
39
run : uv run pre-commit run --all-files
43
40
- name : Minimize uv cache
@@ -51,17 +48,25 @@ jobs:
51
48
- uses : actions/checkout@v4
52
49
with :
53
50
submodules : true
54
- - name : Build image
55
- run : |
56
- docker pull $IMAGE_NAME
57
- docker build -t $IMAGE_NAME:latest . \
58
- --build-arg GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) \
59
- --build-arg GIT_COMMIT=$(git rev-parse HEAD) \
60
- --build-arg GIT_DIRTY=$(git status --porcelain=v1 2>/dev/null | wc -l)
61
- - name : Log in into Docker Hub
62
- run : |
63
- echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
64
51
65
- - name : Push image to registry
66
- run : |
67
- docker push $IMAGE_NAME
52
+ - name : Set up Docker Buildx
53
+ uses : docker/setup-buildx-action@v3
54
+
55
+ - name : Login to Docker Hub
56
+ uses : docker/login-action@v3
57
+ with :
58
+ username : ${{ vars.DOCKER_USERNAME }}
59
+ password : ${{ secrets.DOCKER_TOKEN }}
60
+
61
+ - name : Build and push
62
+ uses : docker/build-push-action@v6
63
+ with :
64
+ push : true
65
+ # GIT_DIRTY=$(git status --porcelain=v1 2>/dev/null | wc -l)
66
+ build-args : |
67
+ GIT_BRANCH=${{ github.ref_name }}
68
+ GIT_COMMIT=${{ github.sha }}
69
+ GIT_DIRTY=0
70
+ tags : fogapod/pink:latest
71
+ cache-from : type=gha
72
+ cache-to : type=gha,mode=max
0 commit comments