Skip to content

Commit

Permalink
fix: build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nourbalaha committed Dec 6, 2024
1 parent 6f4e015 commit 332b901
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get options
id: options
shell: bash
env:
TAG: ${{ inputs.new_tag_short || '' }}
NAME: ${{ inputs.name || 'test-20241206' }}
SHA: ${{ inputs.sha_short || '' }}
NAME: ${{ inputs.name || github.sha }}
SHA: ${{ inputs.sha_short || github.sha }}
run: |
if [[ -n $TAG ]]; then
PLATFORMS=linux/amd64,linux/arm64
Expand All @@ -65,7 +70,7 @@ jobs:
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
context: ..
context: .
file: ./worker/Dockerfile
platforms: ${{ steps.options.outputs.platforms }}
push: true
Expand Down
2 changes: 1 addition & 1 deletion worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY --from=build /app/reearth-cms-worker /app/reearth-cms-worker

WORKDIR /app

CMD [ "./reearth-cms-worker" ]
CMD ["./reearth-cms-worker"]

0 comments on commit 332b901

Please sign in to comment.