diff --git a/.github/workflows/docker-public.yml b/.github/workflows/docker-public.yml index f9c8c16..cb3136f 100644 --- a/.github/workflows/docker-public.yml +++ b/.github/workflows/docker-public.yml @@ -80,7 +80,7 @@ jobs: # echo "package_name=$PACKAGE_NAME" >> $GITHUB_ENV # echo New Package Name $PACKAGE_NAME - - name: Build + - name: Build Docker Image id: step_2 run: | APP_VERSION=${{ env.app_version }} @@ -98,14 +98,39 @@ jobs: [ "$VERSION" == "master" ] && VERSION=latest echo "version=$VERSION" >> $GITHUB_ENV echo "image_id=$IMAGE_ID" >> $GITHUB_ENV - - name: Log in to the Container registry + - name: Log in to the GitHub Container registry + id: step_3 uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: registry: 'ghcr.io' username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Push - id: step_3 + - name: Push to GitHub + id: step_4 + run: | + IMAGE_ID=${{ env.image_id }} + PACKAGE_NAME=${{ env.package_name }} + APP_VERSION=${{ env.app_version }} + VERSION=${{ env.version }} + echo ------------ + echo PACKAGE_NAME: $PACKAGE_NAME + echo IMAGE_ID: $IMAGE_ID + echo APP_VERSION: $APP_VERSION + echo ------------ + echo Try: "$IMAGE_ID:$APP_VERSION" + echo push step - Node Package Version $APP_VERSION + # VERSION=latest + docker tag $PACKAGE_NAME $IMAGE_ID:$APP_VERSION + docker push $IMAGE_ID:$APP_VERSION + - name: Log in to the Docker Container registry + id: step_5 + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: 'docker.io' + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Push to Docker + id: step_6 run: | IMAGE_ID=${{ env.image_id }} PACKAGE_NAME=${{ env.package_name }} @@ -120,4 +145,4 @@ jobs: echo push step - Node Package Version $APP_VERSION # VERSION=latest docker tag $PACKAGE_NAME $IMAGE_ID:$APP_VERSION - docker push $IMAGE_ID:$APP_VERSION \ No newline at end of file + docker push $IMAGE_ID:$APP_VERSION