Multiarch builds (#214)
Changes CICD to build the worker image on separate runners and push to both GHCR and ECR
This commit is contained in:
parent
21ddeb1c93
commit
899c84929b
2 changed files with 267 additions and 111 deletions
307
.github/workflows/release-containers.yml
vendored
307
.github/workflows/release-containers.yml
vendored
|
|
@ -17,22 +17,51 @@ env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-and-publish:
|
set-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.set_version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- name: Wait for tests to succeed
|
||||||
|
uses: lewagon/wait-on-check-action@v1.3.4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
running-workflow-name: 'Main'
|
||||||
|
repo-token: ${{ secrets.PAT }}
|
||||||
|
wait-interval: 10
|
||||||
|
ignore-checks: "release-and-publish"
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
id: set_version
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
|
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "version=$(date +'%Y.%-m.%-d').dev0" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
build-and-push:
|
||||||
|
needs: set-version
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: amd64
|
||||||
|
os: ubuntu-latest
|
||||||
|
- arch: arm64
|
||||||
|
os: linux-arm64
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for tests to succeed
|
|
||||||
uses: lewagon/wait-on-check-action@v1.3.4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
running-workflow-name: 'Main'
|
|
||||||
repo-token: ${{ secrets.PAT }}
|
|
||||||
wait-interval: 10
|
|
||||||
ignore-checks: "release-and-publish"
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -60,113 +89,183 @@ jobs:
|
||||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
- name: Set version
|
- name: Log in to GitHub Container Registry
|
||||||
id: set_version
|
uses: docker/login-action@v2
|
||||||
run: |
|
with:
|
||||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
registry: ${{ env.REGISTRY }}
|
||||||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
username: ${{ github.actor }}
|
||||||
elif [[ $GITHUB_REF == refs/tags/* ]]; then
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "VERSION=$(date +'%Y.%-m.%-d').dev0" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build and push Actor image
|
- name: Build and push Worker image
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
make docker VERSION=${{ env.VERSION }}
|
make docker VERSION=${{ needs.set-version.outputs.version }} ARCH=${{ matrix.arch }}
|
||||||
make publish-ecr VERSION=${{ env.VERSION }}
|
make publish-ecr VERSION=${{ needs.set-version.outputs.version }} ARCH=${{ matrix.arch }}
|
||||||
echo "image=471112909428.dkr.ecr.us-east-1.amazonaws.com/arcadeai/arcade-ai:${{ env.VERSION }}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Deploy to Amazon ECS
|
- name: Push GHCR
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
env:
|
working-directory: ./docker
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
|
||||||
run: gh workflow -R ArcadeAI/Team run Deploy -f actor-version=${{ env.VERSION }}
|
|
||||||
|
|
||||||
- name: Set TAR and WHL names
|
|
||||||
run: |
|
run: |
|
||||||
export PKG=$(ls arcade/dist/ | grep tar)
|
make publish-ghcr VERSION=${{ needs.set-version.outputs.version }} ARCH=${{ matrix.arch }}
|
||||||
set -- $PKG
|
|
||||||
echo "TAR_NAME=$1" >> $GITHUB_ENV
|
|
||||||
export PKG=$(ls arcade/dist/ | grep whl)
|
|
||||||
set -- $PKG
|
|
||||||
echo "WHL_NAME=$1" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
|
|
||||||
- name: Generate release notes
|
push-manifest:
|
||||||
id: generate_release_notes
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
needs: [set-version, build-and-push]
|
||||||
run: |
|
permissions:
|
||||||
echo "Release notes for version ${{ env.VERSION }}" > release_notes.md
|
contents: write
|
||||||
echo "" >> release_notes.md
|
packages: write
|
||||||
echo "Changes in this release:" >> release_notes.md
|
steps:
|
||||||
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s" >> release_notes.md
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Create Release
|
- name: Log in to GitHub Container Registry
|
||||||
id: create_release
|
uses: docker/login-action@v2
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
with:
|
||||||
uses: actions/create-release@v1
|
registry: ${{ env.REGISTRY }}
|
||||||
env:
|
username: ${{ github.actor }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
|
||||||
tag_name: ${{ env.VERSION }}
|
|
||||||
release_name: Release ${{ env.VERSION }}
|
|
||||||
body_path: release_notes.md
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Configure AWS credentials
|
||||||
uses: actions/upload-release-asset@v1
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
with:
|
||||||
env:
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
with:
|
aws-region: us-east-1
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./release_notes.md
|
|
||||||
asset_name: release_notes.md
|
|
||||||
asset_content_type: text/markdown
|
|
||||||
|
|
||||||
- name: Upload Python Tar Asset
|
- name: Login to ECR
|
||||||
uses: actions/upload-release-asset@v1
|
uses: docker/login-action@v3
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
with:
|
||||||
env:
|
registry: 471112909428.dkr.ecr.us-east-1.amazonaws.com
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
with:
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./arcade/dist/${{ env.TAR_NAME }}
|
|
||||||
asset_name: ${{ env.TAR_NAME }}
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload Python Whl Asset
|
- name: Push manifest to ECR
|
||||||
uses: actions/upload-release-asset@v1
|
working-directory: ./docker
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
run: make ecr-manifest VERSION=${{ needs.set-version.outputs.version }}
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./arcade/dist/${{ env.WHL_NAME }}
|
|
||||||
asset_name: ${{ env.WHL_NAME }}
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Zip Full Dist
|
- name: Push manifest to GHCR
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
if: github.event_name == 'push'
|
||||||
run: tar -cvf python-package-distributions.tar.gz ./dist
|
working-directory: ./docker
|
||||||
|
run: make ghcr-manifest VERSION=${{ needs.set-version.outputs.version }}
|
||||||
|
|
||||||
|
# Currently broken: workflow deploy requires all versions
|
||||||
|
# deploy:
|
||||||
|
# if: github.event_name == 'push'
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: [set-version, push-manifest]
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout code
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 0
|
||||||
|
|
||||||
|
# - name: Set image
|
||||||
|
# run: |
|
||||||
|
# echo "image=471112909428.dkr.ecr.us-east-1.amazonaws.com/arcadeai/arcade-ai:${{ needs.set-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# - name: Deploy to Amazon ECS
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
|
# run: gh workflow -R ArcadeAI/Team run Deploy -f actor-version=${{ needs.set-version.outputs.version }}
|
||||||
|
|
||||||
|
|
||||||
- name: Upload Full Dist
|
release:
|
||||||
uses: actions/upload-release-asset@v1
|
needs: [set-version, build-and-push]
|
||||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
runs-on: ubuntu-latest
|
||||||
env:
|
steps:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Checkout code
|
||||||
with:
|
uses: actions/checkout@v3
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
with:
|
||||||
asset_path: python-package-distributions.tar.gz
|
fetch-depth: 0
|
||||||
asset_name: python-package-distributions.tar.gz
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload the distribution packages
|
- name: Make dist
|
||||||
uses: actions/upload-artifact@v4
|
run: make full-dist VERSION=${{ needs.set-version.outputs.version }}
|
||||||
with:
|
|
||||||
name: python-package-distributions
|
- name: Set TAR and WHL names
|
||||||
path: dist/
|
run: |
|
||||||
|
export PKG=$(ls arcade/dist/ | grep tar)
|
||||||
|
set -- $PKG
|
||||||
|
echo "TAR_NAME=$1" >> $GITHUB_ENV
|
||||||
|
export PKG=$(ls arcade/dist/ | grep whl)
|
||||||
|
set -- $PKG
|
||||||
|
echo "WHL_NAME=$1" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Generate release notes
|
||||||
|
id: generate_release_notes
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
echo "Release notes for version ${{ needs.set-version.outputs.version }}" > release_notes.md
|
||||||
|
echo "" >> release_notes.md
|
||||||
|
echo "Changes in this release:" >> release_notes.md
|
||||||
|
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s" >> release_notes.md
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ needs.set-version.outputs.version }}
|
||||||
|
release_name: Release ${{ needs.set-version.outputs.version }}
|
||||||
|
body_path: release_notes.md
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./release_notes.md
|
||||||
|
asset_name: release_notes.md
|
||||||
|
asset_content_type: text/markdown
|
||||||
|
|
||||||
|
- name: Upload Python Tar Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./arcade/dist/${{ env.TAR_NAME }}
|
||||||
|
asset_name: ${{ env.TAR_NAME }}
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload Python Whl Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./arcade/dist/${{ env.WHL_NAME }}
|
||||||
|
asset_name: ${{ env.WHL_NAME }}
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Zip Full Dist
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: tar -cvf python-package-distributions.tar.gz ./dist
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload Full Dist
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: python-package-distributions.tar.gz
|
||||||
|
asset_name: python-package-distributions.tar.gz
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload the distribution packages
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: python-package-distributions
|
||||||
|
path: dist/
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,9 @@ PROJECT ?= ArcadeAI
|
||||||
SOURCE ?= https://github.com/ArcadeAI/arcade-ai
|
SOURCE ?= https://github.com/ArcadeAI/arcade-ai
|
||||||
LICENSE ?= MIT
|
LICENSE ?= MIT
|
||||||
DESCRIPTION ?= "Arcade AI for LLM Tool Serving"
|
DESCRIPTION ?= "Arcade AI for LLM Tool Serving"
|
||||||
REPOSITORY ?= arcadeai/arcade-ai
|
REPOSITORY ?= arcadeai/worker
|
||||||
ECR_ENDPOINT ?= 471112909428.dkr.ecr.us-east-1.amazonaws.com
|
ECR_ENDPOINT ?= 471112909428.dkr.ecr.us-east-1.amazonaws.com
|
||||||
|
ARCH ?= arm64
|
||||||
|
|
||||||
VERSION ?= 0.1.0.dev0
|
VERSION ?= 0.1.0.dev0
|
||||||
COMMIT ?= $(shell git describe --dirty --always --abbrev=15)
|
COMMIT ?= $(shell git describe --dirty --always --abbrev=15)
|
||||||
|
|
@ -32,6 +33,50 @@ docker-build: ## Build the Docker container
|
||||||
--label=org.opencontainers.image.licenses="$(LICENSE)" \
|
--label=org.opencontainers.image.licenses="$(LICENSE)" \
|
||||||
--label=org.opencontainers.image.description=$(DESCRIPTION)
|
--label=org.opencontainers.image.description=$(DESCRIPTION)
|
||||||
|
|
||||||
|
ecr-manifest: ## Make a manifest file for the image
|
||||||
|
@echo "🛠️ Build manifest file ($(VERSION)).."
|
||||||
|
@echo "- Commit: $(COMMIT)"
|
||||||
|
@echo "- Build Date: $(BUILD_DATE)"
|
||||||
|
@export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
@echo "- Creating manifest $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest create $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION) \
|
||||||
|
--amend $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-arm64 \
|
||||||
|
--amend $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-amd64
|
||||||
|
@echo "- Creating manifest $(ECR_ENDPOINT)/$(REPOSITORY):latest"
|
||||||
|
@docker manifest create $(ECR_ENDPOINT)/$(REPOSITORY):latest \
|
||||||
|
--amend $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-arm64 \
|
||||||
|
--amend $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-amd64
|
||||||
|
@echo "- Inspecting manifest $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest inspect $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)
|
||||||
|
@echo "- Inspecting manifest $(ECR_ENDPOINT)/$(REPOSITORY):latest"
|
||||||
|
@docker manifest inspect $(ECR_ENDPOINT)/$(REPOSITORY):latest
|
||||||
|
@echo "- Pushing manifest $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest push $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)
|
||||||
|
@echo "- Pushing manifest $(ECR_ENDPOINT)/$(REPOSITORY):latest"
|
||||||
|
@docker manifest push $(ECR_ENDPOINT)/$(REPOSITORY):latest
|
||||||
|
|
||||||
|
ghcr-manifest: ## Make a manifest file for the image
|
||||||
|
@echo "🛠️ Build manifest file ($(VERSION)).."
|
||||||
|
@echo "- Commit: $(COMMIT)"
|
||||||
|
@echo "- Build Date: $(BUILD_DATE)"
|
||||||
|
@export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
@echo "- Creating manifest ghcr.io/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest create ghcr.io/$(REPOSITORY):$(VERSION) \
|
||||||
|
--amend ghcr.io/$(REPOSITORY):$(VERSION)-arm64 \
|
||||||
|
--amend ghcr.io/$(REPOSITORY):$(VERSION)-amd64
|
||||||
|
@echo "- Creating manifest ghcr.io/$(REPOSITORY):latest"
|
||||||
|
@docker manifest create ghcr.io/$(REPOSITORY):latest \
|
||||||
|
--amend ghcr.io/$(REPOSITORY):$(VERSION)-arm64 \
|
||||||
|
--amend ghcr.io/$(REPOSITORY):$(VERSION)-amd64
|
||||||
|
@echo "- Inspecting manifest ghcr.io/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest inspect ghcr.io/$(REPOSITORY):$(VERSION)
|
||||||
|
@echo "- Inspecting manifest ghcr.io/$(REPOSITORY):latest"
|
||||||
|
@docker manifest inspect ghcr.io/$(REPOSITORY):latest
|
||||||
|
@echo "- Pushing manifest ghcr.io/$(REPOSITORY):$(VERSION)"
|
||||||
|
@docker manifest push ghcr.io/$(REPOSITORY):$(VERSION)
|
||||||
|
@echo "- Pushing manifest ghcr.io/$(REPOSITORY):latest"
|
||||||
|
@docker manifest push ghcr.io/$(REPOSITORY):latest
|
||||||
|
|
||||||
.PHONY: docker-run
|
.PHONY: docker-run
|
||||||
docker-run: ## Run the Docker container
|
docker-run: ## Run the Docker container
|
||||||
@echo "\n🚀 Run the container with the following ..."
|
@echo "\n🚀 Run the container with the following ..."
|
||||||
|
|
@ -41,13 +86,25 @@ docker-run: ## Run the Docker container
|
||||||
.PHONY: publish-ecr
|
.PHONY: publish-ecr
|
||||||
publish-ecr:
|
publish-ecr:
|
||||||
@echo "🚚 Pushing the Agent image to ECR.."
|
@echo "🚚 Pushing the Agent image to ECR.."
|
||||||
@docker tag $(REPOSITORY):$(VERSION) $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)
|
@docker tag $(REPOSITORY):$(VERSION) $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-$(ARCH)
|
||||||
@echo "- pushing $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)"
|
@echo "- pushing $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-$(ARCH)"
|
||||||
@docker push $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)
|
@docker push $(ECR_ENDPOINT)/$(REPOSITORY):$(VERSION)-$(ARCH)
|
||||||
@echo $(VERSION) | grep -q $(RC_PART) || { \
|
@echo $(VERSION) | grep -q $(RC_PART) || { \
|
||||||
docker tag $(REPOSITORY):$(VERSION) $(ECR_ENDPOINT)/$(REPOSITORY):latest; \
|
docker tag $(REPOSITORY):$(VERSION) $(ECR_ENDPOINT)/$(REPOSITORY):latest-$(ARCH); \
|
||||||
echo "- pushing $(ECR_ENDPOINT)/$(REPOSITORY):latest"; \
|
echo "- pushing $(ECR_ENDPOINT)/$(REPOSITORY):latest-$(ARCH)"; \
|
||||||
docker push $(ECR_ENDPOINT)/$(REPOSITORY):latest; \
|
docker push $(ECR_ENDPOINT)/$(REPOSITORY):latest-$(ARCH); \
|
||||||
|
}
|
||||||
|
|
||||||
|
.PHONY: publish-ghcr
|
||||||
|
publish-ghcr:
|
||||||
|
@echo "🚚 Pushing the Agent image to GHCR.."
|
||||||
|
@docker tag $(REPOSITORY):$(VERSION) ghcr.io/$(REPOSITORY):$(VERSION)-$(ARCH)
|
||||||
|
@echo "- pushing ghcr.io/$(REPOSITORY):$(VERSION)-$(ARCH)"
|
||||||
|
@docker push ghcr.io/$(REPOSITORY):$(VERSION)-$(ARCH)
|
||||||
|
@echo $(VERSION) | grep -q $(RC_PART) || { \
|
||||||
|
docker tag $(REPOSITORY):$(VERSION) ghcr.io/$(REPOSITORY):latest-$(ARCH); \
|
||||||
|
echo "- pushing ghcr.io/$(REPOSITORY):latest-$(ARCH)"; \
|
||||||
|
docker push ghcr.io/$(REPOSITORY):latest-$(ARCH); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue