Skip to content

Commit

Permalink
chore: add dependency on docker script to publish-docker targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylvln committed Dec 20, 2022
1 parent 888eed0 commit f2529e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
targets: publish-docker
parallel: 2
args: -- "${{ steps.docker-metadata.outputs.tags }}" "${{ steps.docker-metadata.outputs.labels }}"
env:
DOCKER_BUILDKIT: "1"

publish-maven:
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@
"{workspaceRoot}/settings.gradle",
"{projectRoot}/build.gradle",
"{projectRoot}/gradle.properties"
],
"docker:dependencies": [
"{workspaceRoot}/scripts/publish_docker.sh",
"{projectRoot}/Dockerfile"
]
},
"targetDefaults": {
"publish-docker": {
"inputs": ["default", "docker:dependencies"]
}
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "${labels}" != "" ]; then
labels_params="--label $(echo "${labels}" | sed "s/;;;/ --label /g")"
fi

docker build \
docker buildx build \
--file "apps/${app}/Dockerfile" \
--push \
${tags_params} \
Expand Down

0 comments on commit f2529e4

Please sign in to comment.