Skip to content

Commit

Permalink
Update build-image.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ahemaid authored Mar 27, 2023
1 parent 7094847 commit fc2273f
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,76 +86,3 @@ jobs:
env:
IMAGE: ${{ steps.get_repo.outputs.IMAGE }}
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
debug:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
-
name: Checkout Repo
uses: actions/checkout@v2
-
name: Build registry path
id: get_repo
run: echo ::set-output name=IMAGE::"$REGISTRY/$OWNER/ids-appstore"
-
name: Find tag
id: get_tag
run: |
echo ${GITHUB_REF#refs/tags/}
echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
if: startsWith(github.ref, 'refs/tags')
-
name: Find branch name
id: get_branch
run: |
# to lowercase
TMP=$(git rev-parse --abbrev-ref HEAD)
TMP=$(echo "$TMP" | tr '[:upper:]' '[:lower:]')
echo $TMP
echo ::set-output name=BRANCH::$TMP
-
name: Login to registry
uses: docker/login-action@v1
with:
# This should use REGISTRY instead of the secret directly
registry: ${{ secrets.IMAGE_REGISTRY }}
username: ${{ secrets.REPO_USER }}
password: ${{ secrets.DOCKHUB_TOKEN }}
-
name: Build image
run: |
docker build . -f scripts/ci/docker/Debug.dockerfile -t $IMAGE:$BRANCH
env:
IMAGE: ${{ steps.get_repo.outputs.IMAGE }}
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
DOCKER_BUILDKIT: 1
-
name: Push tagged image
run: |
echo $IMAGE
echo $BRANCH
echo $TAG
TMP=$TAG
if [[ $TMP == v* ]]
then
# Its a version tag
TMP=${TAG:1:${#TAG}}
echo "Found a version tag"
fi
# Has tag
docker tag $IMAGE:$BRANCH $IMAGE:$TMP-debug
docker push $IMAGE:$TMP-debug
if: startsWith(github.ref, 'refs/tags')
env:
IMAGE: ${{ steps.get_repo.outputs.IMAGE }}
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
TAG: ${{ steps.get_tag.outputs.TAG }}
-
name: Push branch image
run: |
docker tag $IMAGE:$BRANCH $IMAGE:$BRANCH-debug
docker push $IMAGE:$BRANCH-debug
if: startsWith(github.ref, 'refs/heads')
env:
IMAGE: ${{ steps.get_repo.outputs.IMAGE }}
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}

0 comments on commit fc2273f

Please sign in to comment.