diff --git a/.github/actions/deploy-to-devnet/action.yaml b/.github/actions/deploy-to-devnet/action.yaml index 89b8935..fae8fbb 100644 --- a/.github/actions/deploy-to-devnet/action.yaml +++ b/.github/actions/deploy-to-devnet/action.yaml @@ -7,6 +7,15 @@ inputs: image_tag: description: Tag of the docker image to be deployed required: true + autocommit-gpg-key-b64: + description: base64 encoded signing key + required: true + autocommit-gpg-key-fingerprint: + description: fingerprint of gpg key + required: true + autocommit-author: + description: Commit author + required: true aws_devnet_access_key_id: required: true aws_devnet_secret_access_key: @@ -55,13 +64,22 @@ runs: cd aleph-apps/indexer/squid/overlays/devnet/eu-central-1 kustomize edit set image "${{ inputs.registry }}-image-placeholder=${{ env.DEPLOY_IMAGE }}" + - name: Configure signing key + shell: bash + run: | + echo ${{ inputs.autocommit-gpg-key-b64 }} | base64 -d > key.gpg + gpg --import key.gpg + rm key.gpg + git config --global user.signingkey $(echo ${{ inputs.autocommit-gpg-key-fingerprint }} | tail -c 17) + - name: GIT | Commit changes to aleph-apps repository uses: EndBug/add-and-commit@v5.1.0 env: GITHUB_TOKEN: ${{ inputs.github_token }} with: - author_name: AlephZero Automation - author_email: alephzero@10clouds.com + author_name: ${{ inputs.autocommit-author }} + author_email: ${{ inputs.autocommit-email }} + commit: -S message: 'Updating Indexer ${{ inputs.registry }} docker image tag: ${{ inputs.image_tag }}' add: '*.yaml' cwd: 'aleph-apps' diff --git a/.github/workflows/build-and-deploy-to-devnet.yml b/.github/workflows/build-and-deploy-to-devnet.yml index 4822816..9cb3f30 100644 --- a/.github/workflows/build-and-deploy-to-devnet.yml +++ b/.github/workflows/build-and-deploy-to-devnet.yml @@ -67,6 +67,10 @@ jobs: aws_devnet_secret_access_key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} github_token: ${{ secrets.CI_GH_TOKEN }} kustomize_version: ${{ vars.KUSTOMIZE_VERSION }} + autocommit-author: ${{ secrets.AUTOCOMMIT_AUTHOR }} + autocommit-email: ${{ secrets.AUTOCOMMIT_EMAIL }} + autocommit-gpg-key-b64: ${{ secrets.AUTOCOMMIT_GPG_KEY_B64 }} + autocommit-gpg-key-fingerprint: ${{ secrets.AUTOCOMMIT_GPG_KEY_FINGERPRINT }} deploy_api: name: Deploy API