Skip to content

Commit

Permalink
feature/github-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Wang committed Oct 14, 2024
1 parent e2fefdf commit db40d34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@ jobs:
docker_version=$(echo ${docker_version}| awk -F \" '{print $2}' |sed 's/v//')
echo $docker_version
minor=${docker_version%.*}
major=${docker_version%%.*}
if [ "$docker_version" == "$VERSION" ]; then
./crane auth login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} index.docker.io
./crane copy ${{ steps.meta.outputs.tags }} ${{ env.IMAGE_NAME }}:latest
./crane copy ${{ steps.meta.outputs.tags }} ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
./crane copy ${{ steps.meta.outputs.tags }} ${{ env.IMAGE_NAME }}:${minor}
./crane copy ${{ steps.meta.outputs.tags }} ${{ env.IMAGE_NAME }}:${major}
rm -f /home/runner/.docker/config.json
else
echo "Versions are different. Skipping..."
Expand Down

0 comments on commit db40d34

Please sign in to comment.