diff --git a/workflows/goss-testing.yaml b/workflows/goss-testing.yaml new file mode 100644 index 0000000..5fa7ca6 --- /dev/null +++ b/workflows/goss-testing.yaml @@ -0,0 +1,46 @@ +# This is a basic workflow to help you get started with Actions +name: S3 Upload + +on: + push: + branches: [ "main" ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: [ image-pipeline-goss-testing ] + env: + AWS_SECRET_ACCESS_KEY: "$${{ secrets.AWS_SECRET_ACCESS_KEY }}" + AWS_ACCESS_KEY_ID: "$${{ vars.AWS_ACCESS_KEY_ID }}" + AWS_SESSION_TOKEN: "$${{ secrets.AWS_SESSION_TOKEN }}" + + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - uses: CSVD/gh-actions-setup-node@v3 + with: + node-version: 16 + + - uses: CSVD/gh-actions-setup-terraform@v2 + with: + terraform_wrapper: false + terraform_version: $${{ vars.terraform_version }} + + - name: get latest + run: | + terraform init -input=false -upgrade + terraform apply -auto-approve -input=false + working-directory: ./update + + - name: archive and upload + run: | + rm -rf .terraform update update/.terraform + zip -r image-pipeline-goss-testing.zip * + aws s3 cp image-pipeline-goss-testing.zip s3://image-pipeline-assets