Skip to content

Commit

Permalink
Revert "Push multi-arch docker image (#18)"
Browse files Browse the repository at this point in the history
This reverts commit 75d8f4c.

Signed-off-by: Nick Hill <nickhill@us.ibm.com>
  • Loading branch information
njhill committed Jan 10, 2023
1 parent c939301 commit f3768a3
Showing 1 changed file with 9 additions and 37 deletions.
46 changes: 9 additions & 37 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [main]
tags:
- v*
pull_request:

jobs:
test:
Expand All @@ -23,49 +22,22 @@ jobs:
build:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'

env:
IMAGE_NAME: rest-proxy

IMAGE_NAME: kserve/rest-proxy
steps:
- uses: actions/checkout@v2

- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: export version variables
- name: Build runtime image
run: make build
- name: Log in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Push to Docker Hub
run: |
IMAGE_ID=kserve/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
target: runtime
docker tag ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:$VERSION
docker push ${{ env.IMAGE_NAME }}:$VERSION

0 comments on commit f3768a3

Please sign in to comment.