Skip to content

Commit

Permalink
chore: Move and rename binary in DockerHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorfdl committed Jun 21, 2024
1 parent 43d234e commit 0d045f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,18 @@ jobs:
# - name: Run Tests
# run: cross test --verbose --target ${{ matrix.config.target }}

- name: Move and rename binary
run: |
mkdir -p build
cp target/${{ matrix.config.target }}/release/tagoio-relay build/${{ env.FILENAME }}
# Upload artifacts if this is not a release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.FILENAME }}
retention-days: 1
path: target/${{ matrix.config.target }}/release/tagoio-relay
path: build/${{ env.FILENAME }}

push-to-dockerhub:
needs: build
Expand All @@ -84,6 +89,7 @@ jobs:
with:
path: build
pattern: debian-*
merge-multiple: true

- name: List files
run: ls -la build
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ COPY /debian-* .

# Rename the correct executable based on the platform
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
mv debian-linux-amd64 tagoio-relay; \
mv ./debian-linux-amd64 tagoio-relay; \
elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
mv debian-linux-arm64 tagoio-relay; \
mv ./debian-linux-arm64-v8 tagoio-relay; \
else \
echo "Unsupported platform: ${TARGETPLATFORM}"; \
exit 1; \
Expand Down
2 changes: 1 addition & 1 deletion dockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fi

# Display the tags
echo "Tags to be used: $TAGS"
# Debian

cd build
docker buildx build --push --build-arg TAGORELAY_VERSION=${FULL_VERSION} \
--file Dockerfile.${DISTRIBUTION} \
Expand Down

0 comments on commit 0d045f6

Please sign in to comment.