From a60ff3aee17d5810b686d8df64dcff2ccb9f8337 Mon Sep 17 00:00:00 2001 From: Bill Wang Date: Thu, 3 Oct 2024 11:25:53 +1000 Subject: [PATCH] test with Github action --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd29d40..e083736 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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}