diff --git a/.github/workflows/release-image.yml b/.github/workflows/release-image.yml index 3baa57c..2366f5f 100644 --- a/.github/workflows/release-image.yml +++ b/.github/workflows/release-image.yml @@ -7,7 +7,7 @@ on: jobs: publish-image: - runs-on: ubuntu-latest + runs-on: self-hosted name: Publish container image steps: - name: Checkout @@ -28,3 +28,9 @@ jobs: run: make docker-build - name: Push container image to dockerhub run: make docker-push + - name: Tag image with ECR URI + run: | + echo "NEW_IMAGE=${{ secrets.ECR_URI }}/init:${{ env.IMAGE_TAG }}" >> $GITHUB_ENV + docker tag ${{ env.IMAGE_TAG }} ${{ env.NEW_IMAGE }} + - name: Push container image to ECR + run: docker push ${{ env.NEW_IMAGE }} diff --git a/Makefile b/Makefile index f7b17a3..2bbe780 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ IMAGE ?= storageos/init:test + GO_BUILD_CMD = go build -v GO_ENV = GOOS=linux CGO_ENABLED=0