Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): merge docker build & push #130

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

tk-o
Copy link
Contributor

@tk-o tk-o commented Jan 30, 2025

This one allows saving a lot of space on the GitHub Action runtime and avoid "no space left on the device" error. Before this change, there would be separate steps for building Docker image, and for pushing it to container registry. It would require a temp file to be saved and shared between those files. This temp file was too large to fit on the available storage space.

Error:

This one allows saving a lot of space on the GitHub Action runtime and avoid "no space left on the device" error.
@tk-o tk-o requested a review from a team as a code owner January 30, 2025 21:46
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/ensrainbow
TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || github.ref == 'refs/heads/alpha' && 'alpha' || github.ref == 'refs/heads/subgraph' && 'subgraph' }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker build -f apps/ensrainbow/Dockerfile -t $IMAGE_NAME:$TAG -t $IMAGE_NAME:${{ github.sha }} .
docker save $IMAGE_NAME:$TAG $IMAGE_NAME:${{ github.sha }} > image.tar
Copy link
Contributor Author

@tk-o tk-o Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was causing the "no space left on device" error, as it was effectively doubling the 7GB file.

@shrugs shrugs merged commit a38060c into main Jan 30, 2025
3 checks passed
@shrugs shrugs deleted the fix/ci-docker-build-and-push branch January 30, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants