Workflow variables fixed
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
This commit is contained in:
parent
943f488bbe
commit
dc3ab7e3c0
1 changed files with 6 additions and 6 deletions
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${REGITRY_HOST}
|
registry: ${{ vars.REGITRY_HOST }}
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
|
@ -26,20 +26,20 @@ jobs:
|
||||||
SHORT_HASH: ${{ github.sha }}
|
SHORT_HASH: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
# Build the image with the commit hash tag
|
# Build the image with the commit hash tag
|
||||||
docker build --build-arg BUILD_IDENTIFIER=${SHORT_HASH:0:5} -t ${REGITRY_HOST}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5} .
|
docker build --build-arg BUILD_IDENTIFIER=${SHORT_HASH:0:5} -t ${{ vars.REGITRY_HOST }}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5} .
|
||||||
|
|
||||||
# Tag the same image as "latest"
|
# Tag the same image as "latest"
|
||||||
docker tag ${REGITRY_HOST}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5} ${REGITRY_HOST}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-latest
|
docker tag ${{ vars.REGITRY_HOST }}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5} ${{ vars.REGITRY_HOST }}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-latest
|
||||||
|
|
||||||
- name: Push Docker Images
|
- name: Push Docker Images
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.ref_name }}
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
SHORT_HASH: ${{ github.sha }}
|
SHORT_HASH: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
docker push ${REGITRY_HOST}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5}
|
docker push ${{ vars.REGITRY_HOST }}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-${SHORT_HASH:0:5}
|
||||||
docker push ${REGITRY_HOST}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-latest
|
docker push ${{ vars.REGITRY_HOST }}/${GITHUB_REPOSITORY}:${BRANCH_NAME}-latest
|
||||||
|
|
||||||
- name: Log out from registry
|
- name: Log out from registry
|
||||||
if: always()
|
if: always()
|
||||||
run: docker logout ${REGITRY_HOST}
|
run: docker logout ${{ vars.REGITRY_HOST }}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue