diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec2e0cd..44dde0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,12 +6,23 @@ on: jobs: build-gradle-project: runs-on: ubuntu-latest + permissions: + id-token: write + contents: read steps: - name: Checkout project sources - uses: actions/checkout@v3 + uses: actions/checkout@main - name: Setup Gradle uses: gradle/gradle-build-action@v2 - name: Run build with Gradle Wrapper run: ./gradlew checksum - name: List files - run: ls -lrta \ No newline at end of file + run: ls -lrta + - name: Configure AWS CLI + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::764439458017:role/github-actions + aws-region: eu-central-1 + - name: Copy Files to S3 + run: | + aws s3 sync checksum s3://tests-checksums \ No newline at end of file diff --git a/.gitignore b/.gitignore index b2d7f17..bd1dfa4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /target/ /.idea build -.gradle \ No newline at end of file +.gradle +checksum \ No newline at end of file diff --git a/build.gradle b/build.gradle index d74b7be..f87f233 100644 --- a/build.gradle +++ b/build.gradle @@ -65,6 +65,7 @@ tasks.register('checksum') { task: 'Task 1', testFiles: testFiles ] - new File(projectDir, "stage0-module2-task1.json").text = new JsonOutput().toJson(payload) + new File(projectDir, "checksum").mkdirs() + new File(projectDir, "checksum/stage0-module2-task1.json").text = new JsonOutput().toJson(payload) } } \ No newline at end of file