Skip to content

Commit

Permalink
test with Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Wang committed Oct 3, 2024
1 parent 12aab4f commit a60ff3a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,12 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- run: bash ./test.sh ${{ env.IMAGE_NAME }}/${{ steps.meta.outputs.tags }}

- run: |
VERSION=($(docker run -i --rm ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} version|awk '{print $NF}'))
docker run -ti - rm -v $(pwd)/.docker:/root/.docker alpine/crane auth login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} index.docker.io
docker run -ti - rm -v $(pwd)/.docker:/root/.docker alpine/crane copy ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} alpine/git:latest
docker run -ti - rm -v $(pwd)/.docker:/root/.docker alpine/crane copy ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} alpine/git:${VERION}
docker run -ti - rm -v $(pwd)/.docker:/root/.docker alpine/crane copy ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} alpine/git:v${VERION}

0 comments on commit a60ff3a

Please sign in to comment.