Skip to content

Commit

Permalink
fix: Retry build
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 12, 2024
1 parent a8a0db9 commit 44452a7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/rust-on-nails-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and cache multi-arch image

- name: Build Docker file (AMD64)
run: |
docker build --platform amd64 -t purtontech/rust-on-nails-devcontainer dev-env-as-code
docker push purtontech/rust-on-nails-devcontainer
- name: Build Docker file (ARM64)
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/purtontech/rust-on-nails-devcontainer:temp-tag --load dev-env-as-code
docker build --platform arm64 -t purtontech/rust-on-nails-devcontainer dev-env-as-code
docker push purtontech/rust-on-nails-devcontainer
# If this is a release
# create release notes
Expand All @@ -50,6 +56,13 @@ jobs:
npm i -D @semantic-release/git
npx semantic-release
- name: Tag and Push Docker Image
if: steps.semantic-release.outputs.new-release-published == 'true'
run: |
docker pull ghcr.io/purtontech/rust-on-nails-devcontainer:latest
docker tag ghcr.io/purtontech/rust-on-nails-devcontainer:latest ghcr.io/purtontech/rust-on-nails-devcontainer:${{ steps.semantic-release.outputs.version }}
docker push ghcr.io/purtontech/rust-on-nails-devcontainer:${{ steps.semantic-release.outputs.version }}
- name: "Publish Templates"
uses: devcontainers/action@v1
with:
Expand Down
7 changes: 0 additions & 7 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"prepareCmd": "",
"publishCmd": "docker tag ghcr.io/purtontech/rust-on-nails-devcontainer:temp-tag ghcr.io/purtontech/rust-on-nails-devcontainer:${nextRelease.version} && docker tag ghcr.io/purtontech/rust-on-nails-devcontainer:temp-tag ghcr.io/purtontech/rust-on-nails-devcontainer:latest && docker push ghcr.io/purtontech/rust-on-nails-devcontainer:${nextRelease.version} && docker push ghcr.io/purtontech/rust-on-nails-devcontainer:latest"
}
],
["@semantic-release/exec", {
"publishCmd": "./release.sh ${nextRelease.version}",
"execCwd": "./"
Expand Down
1 change: 1 addition & 0 deletions dev-env-as-code/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ COPY --chown=$USERNAME --from=builder /home/cargo-watch $CARGO_HOME/bin
#COPY --chown=$USERNAME --from=builder /usr/local/cargo/bin/cornucopia $CARGO_HOME/bin
COPY --chown=$USERNAME --from=builder /usr/local/cargo/bin/cargo-binstall $CARGO_HOME/bin


# Pulumi
RUN curl -fsSL https://get.pulumi.com | sudo -E bash - \
&& sudo chown -R $USERNAME:$USERNAME /home/$USERNAME/.pulumi
Expand Down

0 comments on commit 44452a7

Please sign in to comment.