Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync built images to ECR and GHCR on release #831

Merged
merged 4 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ jobs:
pulumi/pulumi-kubernetes-operator:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
sync-images:
uses: ./.github/workflows/sync-images.yaml
needs: docker
secrets: inherit
with:
operator_version: ${{ env.VERSION }}
release:
name: Create a GitHub Release
needs: docker
needs: [docker, sync-images]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
operator_version:
description: The image tag to copy, fully specified, e.g. "3.18.1"
description: The image tag to copy, fully specified, e.g. "v2.0.0"
type: string
required: true
repository_dispatch:
Expand Down Expand Up @@ -44,14 +44,9 @@ jobs:
--query 'authorizationData.authorizationToken' | \
tr -d '"' | base64 --decode | cut -d: -f2 | \
docker login -u AWS --password-stdin https://public.ecr.aws
- name: Pull ${{ env.OPERATOR_VERSION }} from Docker Hub
- name: Copy ${{ env.OPERATOR_VERSION }} image to AWS Public ECR
run: |
docker pull docker.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
- name: Tag ${{ env.OPERATOR_VERSION }} and push to AWS Public ECR
skopeo copy --all docker://docker.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }} docker://public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
- name: Copy ${{ env.OPERATOR_VERSION }} image to GitHub Container Registry
run: |
docker tag docker.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }} public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
docker push public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
- name: Tag ${{ env.OPERATOR_VERSION }} and push to GitHub Container Registry
run: |
docker tag docker.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }} ghcr.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
docker push ghcr.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
skopeo copy --all docker://docker.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }} docker://ghcr.io/${{ env.DOCKER_USERNAME }}/${{ env.OPERATOR_IMAGE_NAME }}:${{ env.OPERATOR_VERSION }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CHANGELOG
- Use audience-scoped access token. [#816](https://github.com/pulumi/pulumi-kubernetes-operator/pull/816)
- Enable setting the log verbosity of Pulumi CLI operations for a given workspace. [#824](https://github.com/pulumi/pulumi-kubernetes-operator/pull/824)
- Use pulumi.com labels [#829](https://github.com/pulumi/pulumi-kubernetes-operator/pull/829)
- Releases will now be published to AWS ECR and GHCR [#831](https://github.com/pulumi/pulumi-kubernetes-operator/pull/831)

## 2.0.0-beta.3 (2024-11-27)

Expand Down