Enhance Docker build process by adding FORGE_SNAPSHOT_TAG argument and updating image build and push steps for better clarity and functionality
Some checks failed
Build & Push Forge-Kasm / docker (push) Failing after 53s
Some checks failed
Build & Push Forge-Kasm / docker (push) Failing after 53s
This commit is contained in:
@@ -44,16 +44,23 @@ jobs:
|
||||
USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
|
||||
TAG=${{ steps.get_tag.outputs.snapshot_tag }}
|
||||
|
||||
echo "Building and pushing image as: $USERNAME/$IMAGE:$TAG"
|
||||
echo "Building Docker image as: $USERNAME/$IMAGE:$TAG"
|
||||
|
||||
docker build -t $USERNAME/$IMAGE:$TAG .
|
||||
docker build \
|
||||
--build-arg FORGE_SNAPSHOT_TAG=$TAG \
|
||||
-t $USERNAME/$IMAGE:$TAG .
|
||||
|
||||
echo "Pushing Docker image: $USERNAME/$IMAGE:$TAG"
|
||||
docker push $USERNAME/$IMAGE:$TAG
|
||||
|
||||
- name: (Optional) Also Push 'latest' Tag
|
||||
- name: Also Push 'latest' Tag
|
||||
run: |
|
||||
IMAGE=forge-kasm
|
||||
USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
|
||||
TAG=${{ steps.get_tag.outputs.snapshot_tag }}
|
||||
|
||||
echo "Tagging image as 'latest'"
|
||||
docker tag $USERNAME/$IMAGE:$TAG $USERNAME/$IMAGE:latest
|
||||
|
||||
echo "Pushing Docker image: $USERNAME/$IMAGE:latest"
|
||||
docker push $USERNAME/$IMAGE:latest
|
||||
|
||||
Reference in New Issue
Block a user