Skip to content

Commit

Permalink
Sync Use crazy-max/[email protected] From Private Repo (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethAmazon authored Nov 22, 2022
1 parent bc22201 commit 76f07ee
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/integrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ env:
TERRAFORM_AWS_ASSUME_ROLE: ${{ secrets.TERRAFORM_AWS_ASSUME_ROLE }}
S3_INTEGRATION_BUCKET: ${{ secrets.S3_INTEGRATION_BUCKET }}
KEY_NAME: ${{ secrets.KEY_NAME }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_TTY: $(tty)
ECR_INTEGRATION_TEST_REPO: "cwagent-integration-test"
CWA_GITHUB_TEST_REPO_NAME: "aws/amazon-cloudwatch-agent-test"
CWA_GITHUB_TEST_REPO_URL: "https://github.com/aws/amazon-cloudwatch-agent-test.git"
Expand Down Expand Up @@ -68,17 +64,18 @@ jobs:
key: "cached_binaries_${{ github.sha }}"
path: go.mod

- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Build Binaries
if: steps.cached_binaries.outputs.cache-hit != 'true'
run: make build package-rpm package-deb package-win package-darwin

- uses: olafurpg/setup-gpg@v3

- name: Sign packages
if: steps.cached_binaries.outputs.cache-hit != 'true'
run: |
echo "${GPG_PRIVATE_KEY}" | gpg --batch --import -
for f in $(find build/bin/); do if [ ! -d $f ]; then echo "Signing file $f" && echo "${PASSPHRASE}" | gpg --detach-sign --passphrase-fd 0 --batch --default-key "${GPG_KEY_NAME}" $f ; fi ; done
- name: Sign Build Files
run: for f in $(find build/bin/); do if [ ! -d $f ]; then echo "Signing file $f" && gpg --detach-sign $f ; fi ; done


- name: Upload to s3
Expand Down Expand Up @@ -319,7 +316,6 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-gpg@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -343,11 +339,14 @@ jobs:
aws s3 cp s3://${S3_INTEGRATION_BUCKET}/integration-test/packaging/${{ github.sha }}/amd64/amazon-cloudwatch-agent.pkg ./packages/amd64/amazon-cloudwatch-agent.pkg
aws s3 cp s3://${S3_INTEGRATION_BUCKET}/integration-test/packaging/${{ github.sha }}/arm64/amazon-cloudwatch-agent.pkg ./packages/arm64/amazon-cloudwatch-agent.pkg
- name: Sign packages
if: steps.cached_sig.outputs.cache-hit != 'true'
run: |
echo "${GPG_PRIVATE_KEY}" | gpg --batch --import -
for f in $(find packages/); do if [ ! -d $f ]; then echo "Signing file $f" && echo "${PASSPHRASE}" | gpg --detach-sign --passphrase-fd 0 --batch --default-key "${GPG_KEY_NAME}" $f ; fi ; done
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Sign Build Files
run: for f in $(find packages/); do if [ ! -d $f ]; then echo "Signing file $f" && gpg --detach-sign $f ; fi ; done

- name: Upload to s3
if: steps.cached_sig.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 76f07ee

Please sign in to comment.