Skip to content

Commit

Permalink
WIP: add composite actions
Browse files Browse the repository at this point in the history
  • Loading branch information
beuluis committed Dec 17, 2024
1 parent f076bfe commit 7ba630f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions .github/actions/upload-to-s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,13 @@ runs:
using: "composite"
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: s3-actions/s3cmd@v1
with:
aws-access-key-id: ${{ inputs.aws_access_key_id }}
aws-secret-access-key: ${{ inputs.aws_secret_access_key }}
aws-region: ${{ inputs.aws_region }}
mask-aws-account-id: true

- name: Set endpoint URL
if: inputs.endpoint_url != ''
shell: bash
run: |
aws configure set s3.endpoint_url ${{ inputs.endpoint_url }}
provider: 'Hetzner Cloud'
access_key: ${{ inputs.aws_access_key_id }}
secret_key: ${{ inputs.aws_secret_access_key }}

- name: Deploy to S3
shell: bash
run: |
aws s3 sync ${{ inputs.path_to_upload }} s3://${{ inputs.s3_bucket }}/${{ inputs.target_path }} --delete
s3cmd sync ${{ inputs.path_to_upload }} s3://${{ inputs.s3_bucket }}/${{ inputs.target_path }} --delete
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: appleboy/ssh-action@v1.0.0
env:
ENVIRONMENT_NAME: ${{ inputs.environment_name }}
REPO_NAME: ${{ github.repository }}
REPO_NAME: ${{ github.event.repository.name }}
REPO_URL: https://github.com/${{ github.repository }}
REVISON: ${{ github.ref }}
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
Expand Down

0 comments on commit 7ba630f

Please sign in to comment.