0

I have a YAML file for a pipeline on github actions.

It works but I need to add some metadata as well.

This is my YAML file:

name: Upload to S3
on:
  push:
    branches:
      - test-s3

jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: shallwefootball/s3-upload-action@master
        with:
          aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws_bucket: ${{ secrets.AWS_BUCKET_NAME }}
          source_dir: "public/"
          destination_dir: "project/assets/js/test/"

This is the metadata that I want to add when I try to run this YAML file.

Key: Content-Type

Value: max-age=600

Do you have any idea to add metadata to this YAML file?

ffcabbar
  • 351
  • 1
  • 3
  • 18
  • 1
    It doesn't seem to be possible with this action. If there is another one on the Github Marketplace which allows to send the command line arguments, you may be able to add what you want using the `--metadata` flag to it ([reference](https://stackoverflow.com/questions/40626967/aws-s3-cli-cp-file-and-add-metadata)) – GuiFalourd Oct 07 '22 at 11:28
  • thanks a lot! I'll check out the marketplace. Do you know any? you can past the link here if you know any. – ffcabbar Oct 07 '22 at 11:59
  • 1
    There are many option regarding [S3 usage on the Marketplace](https://github.com/marketplace?type=actions&query=s3+). [This action](https://github.com/marketplace/actions/s3-sync) seems to receive the command argument via input, so it may work in your context. – GuiFalourd Oct 07 '22 at 13:56

0 Answers0