Stage v1.9.0 release #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# This workflow copies image from testing private repository to: | |
# 1) private ARS source repository | |
# 2) public repository | |
env: | |
AWS_SRC_REGION : "us-east-1" # this is where our testing repo exists | |
AWS_DEST_REGION : "us-west-2" # this is where our prod repos exist | |
COMMIT_ID: ${{ github.sha }} | |
GIT_TAG: ${{ github.ref_name }} | |
IMAGE_NAME: "s3-csi-driver" | |
PUBLIC_REGISTRY: "public.ecr.aws/mountpoint-s3-csi-driver/aws-mountpoint-s3-csi-driver" | |
jobs: | |
build: | |
# this is to prevent the job to run at forked projects | |
if: github.repository == 'awslabs/mountpoint-s3-csi-driver' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up crane | |
uses: imjasonh/[email protected] | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Configure AWS Credentials from Test acccount | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
role-to-assume: ${{ secrets.TEST_IAM_ROLE }} | |
aws-region: ${{ env.AWS_SRC_REGION }} | |
- name: Login to Amazon ECR test | |
id: login-ecr-test | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Configure AWS Credentials from Prod account | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
role-to-assume: ${{ secrets.PROD_IAM_IMAGE_ROLE }} | |
aws-region: ${{ env.AWS_DEST_REGION }} | |
- name: Login to Amazon ECR prod | |
id: login-ecr-prod | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Configure AWS Credentials from Prod account (for public repo) | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
role-to-assume: ${{ secrets.PROD_IAM_IMAGE_ROLE }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR Public | |
id: login-ecr-public | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Promote image | |
env: | |
ARS_REGISTRY: ${{ secrets.ARS_REGISTRY }} | |
run: | | |
crane copy ${{ steps.login-ecr-test.outputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_ID }} ${ARS_REGISTRY}:${{ env.GIT_TAG }} | |
crane copy ${{ steps.login-ecr-test.outputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_ID }} ${{ env.PUBLIC_REGISTRY }}:${{ env.GIT_TAG }} | |
- name: Create Release | |
id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
Mountpoint for Amazon S3 CSI Driver | |
## CHANGELOG | |
See [CHANGELOG](https://github.com/awslabs/mountpoint-s3-csi-driver/blob/main/CHANGELOG.md) for full list of changes | |
draft: true | |
prerelease: false | |
helm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
config: .github/cr.yaml | |
mark_as_latest: false |