Skip to content

Commit

Permalink
update: docker image build
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi-bams committed May 14, 2024
1 parent f879688 commit 4dce183
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,20 @@ jobs:
run: |
echo $RELEASE_TAG
echo ${{ env.RELEASE_TAG }}
- name: Run Docker buildx
- name: Build Docker image
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm64/v8,linux/arm/v7 \
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:${{ env.RELEASE_TAG }}" \
--output "type=registry" ./
- name: Run Docker buildx with latest tag
--load \
--tag "sphinx-relay:temp" \
./
- name: Tag and push Docker image with specific version tag
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm64/v8,linux/arm/v7 \
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:latest" \
--output "type=registry" ./
docker tag "sphinx-relay:temp" "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:${{ env.RELEASE_TAG }}"
docker push "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:${{ env.RELEASE_TAG }}"
- name: Tag and push Docker image with latest tag
run: |
docker tag "sphinx-relay:temp" "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:latest"
docker push "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:latest"
25 changes: 13 additions & 12 deletions .github/workflows/docker-swarm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,21 @@ jobs:
run: |
echo $RELEASE_TAG
echo ${{ env.RELEASE_TAG }}
- name: Run Docker buildx
- name: Build Docker image
run: |
docker buildx build -f Dockerfile.swarm \
--cache-from "type=local,src=/tmp/.buildx-cache" \
docker buildx build \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm64/v8,linux/arm/v7 \
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:${{ env.RELEASE_TAG }}" \
--output "type=registry" ./
- name: Run Docker buildx with latest tag
--load \
--tag "sphinx-relay-swarm:temp" \
./
- name: Tag and push Docker image with specific version tag
run: |
docker buildx build -f Dockerfile.swarm \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm64/v8,linux/arm/v7 \
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:latest" \
--output "type=registry" ./
docker tag "sphinx-relay-swarm:temp" "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:${{ env.RELEASE_TAG }}"
docker push "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:${{ env.RELEASE_TAG }}"
- name: Tag and push Docker image with latest tag
run: |
docker tag "sphinx-relay-swarm:temp" "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:latest"
docker push "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay-swarm:latest"

0 comments on commit 4dce183

Please sign in to comment.