-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use self-hosted action instead of drone. (#16)
- Loading branch information
1 parent
34e5eea
commit 90db8d1
Showing
2 changed files
with
46 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- v** | ||
jobs: | ||
publish-ecr: | ||
runs-on: self-hosted | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: arn:aws:iam::558830342743:role/PublishCleanerController | ||
role-session-name: github-actions-from-cleaner-controller | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR Public | ||
id: login-ecr-public | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
with: | ||
registry-type: public | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.19' | ||
|
||
- name: Build, tag, and push docker image to Amazon ECR Public | ||
uses: int128/kaniko-action@v1 | ||
with: | ||
push: true | ||
tags: ${{ steps.login-ecr-public.outputs.registry }}/f8y0w2c4/cleaner-controller:${{ github.ref_name }} | ||
|
||
- name: Publish helm chart | ||
run: | | ||
make helm VERSION=manager-${{ github.ref_name }} | ||
# latest v3.13.0 helm is bugged https://github.com/helm/helm/issues/12423 | ||
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s -- --version v3.12.3 | ||
helm package ./cleaner-controller --app-version ${{ github.ref_name }} --version ${{ github.ref_name }} | ||
helm push ./cleaner-controller-${{ github.ref_name }}.tgz oci://public.ecr.aws/f8y0w2c4 | ||
This file was deleted.
Oops, something went wrong.