refactor: reduce docker image size

This commit is contained in:
Juan Rodriguez
2024-07-12 22:53:48 +02:00
parent 36a06ac670
commit 115bbf7366
4 changed files with 66 additions and 64 deletions
+10 -3
View File
@@ -39,6 +39,15 @@ jobs:
VERSION=$(echo $VERSION | tr -d '\n\r')
echo "RELEASE_TAG=$VERSION" >> $GITHUB_ENV
- name: Set tags
id: set_tags
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "TAGS=latest,${{ env.RELEASE_TAG }}" >> $GITHUB_ENV
else
echo "TAGS=latest" >> $GITHUB_ENV
fi
- name: Build and push image
id: push
uses: docker/build-push-action@v5.0.0
@@ -46,9 +55,7 @@ jobs:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
sjdonado/bit:latest
${{ github.event_name == 'release' && env.RELEASE_TAG && 'sjdonado/bit:${{ env.RELEASE_TAG }}' || '' }}
tags: sjdonado/bit:${{ env.TAGS }}
- name: Attest
uses: actions/attest-build-provenance@v1