Skip to content

Commit

Permalink
Update docker-public.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewiski authored Sep 30, 2022
1 parent 02f1b06 commit 19561c3
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/docker-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
docker push $IMAGE_ID:$APP_VERSION

0 comments on commit 19561c3

Please sign in to comment.