Skip to content

Commit

Permalink
Use self-hosted action instead of drone. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
cezar-guimaraes authored Oct 5, 2023
1 parent 34e5eea commit 90db8d1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 52 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yaml
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
52 changes: 0 additions & 52 deletions .vtex/drone.yml

This file was deleted.

0 comments on commit 90db8d1

Please sign in to comment.