Skip to content

Commit

Permalink
fix/multiarch (#301)
Browse files Browse the repository at this point in the history
* chore: Update file paths in GoReleaser config

* chore: Add new file to gitignore

* style: Update .gitignore pattern

* chore: Remove unnecessary gitignore update

* feat: Add Docker credentials for DockerHub in workflow
  • Loading branch information
samcm committed Apr 17, 2024
1 parent e1f0465 commit 728ff47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,23 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Update GoReleaser config
run: |
cp .goreleaser.yaml ../.goreleaser.yaml.new
cp .goreleaser.yaml .goreleaser.yaml.new
# If we have a RELEASE_SUFFIX, update the goreleaser config to not set
# the release as the latest
if [[ -n "$RELEASE_SUFFIX" ]]; then
echo "release:" >> ../.goreleaser.yaml.new
echo " prerelease: true" >> ../.goreleaser.yaml.new
echo " make_latest: false" >> ../.goreleaser.yaml.new
echo "release:" >> .goreleaser.yaml.new
echo " prerelease: true" >> .goreleaser.yaml.new
echo " make_latest: false" >> .goreleaser.yaml.new
fi
- name: Run GoReleaser in Docker
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-e DOCKER_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} \
-e DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }} \
-v /var/run/docker.sock:/var/run/docker.sock \
-e RELEASE_SUFFIX=${{ env.RELEASE_SUFFIX }} \
goreleaser/goreleaser-cross:v1.22.2 release --clean --config .goreleaser.yaml.new
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ GeoLite2-ASN.mmdb
GeoLite2-City.mmdb
__debug_bin*
.vscode/launch.json
sage.yaml
sage.yaml
.goreleaser.yaml.new

0 comments on commit 728ff47

Please sign in to comment.