File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 2828 # Will be "NASA-AMMOS/Veloserver" for the main repo, for forks "user-name-of-fork/Veloserver"
2929 # For generating the tag, all will be converted to lowercase
3030 IMAGE_SLUG : ${{ github.repository }}
31+ DOCKER_PLATFORMS : linux/amd64,linux/arm64 # Add this line
3132
3233jobs :
3334 # Push image to GitHub Container Registry.
@@ -107,11 +108,22 @@ jobs:
107108 echo "REGISTRY_TAGS_PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
108109 echo "SHA_SHORT=$SHA_SHORT" >> $GITHUB_OUTPUT
109110
111+ - name : Set up Docker Buildx
112+ uses : docker/setup-buildx-action@v3
113+
110114 - name : Login to GHCR
111115 run : echo ${{ secrets.GITHUB_TOKEN }} | docker login -u ${{ github.actor }} --password-stdin ghcr.io
112116
113- - name : Docker build
114- run : docker build --no-cache ${{ steps.generate.outputs.REGISTRY_TAGS }} .
115-
116- - name : Docker push
117- run : docker push ${{ steps.generate.outputs.IMAGE_ID }} --all-tags
117+ - name : Docker build and push
118+ env :
119+ DOCKER_PLATFORM_OPTION : linux/amd64,linux/arm64
120+ run : |
121+ # Convert REGISTRY_TAGS format for buildx
122+ BUILDX_TAGS=$(echo "${{ steps.generate.outputs.REGISTRY_TAGS }}" | sed 's/-t /--tag /g')
123+
124+ docker buildx build \
125+ --platform $DOCKER_PLATFORM_OPTION \
126+ --push \
127+ --no-cache \
128+ $BUILDX_TAGS \
129+ .
You can’t perform that action at this time.
0 commit comments