Skip to content

push cookbooks to branch directory instead of s3 bucket root directory #17

push cookbooks to branch directory instead of s3 bucket root directory

push cookbooks to branch directory instead of s3 bucket root directory #17

name: Compress Cookbooks
on: [push]
jobs:
compress:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Compress Cookbooks
run: |
cd ..
tar -czvf cookbooks.tar.gz -C ${{ github.workspace }} .
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to S3
run: aws s3 cp ${{ github.workspace }}/../cookbooks.tar.gz s3://ssm.jumbledev.com/${{ github.ref_name }}/cookbooks.tar.gz