|
12 | 12 | id-token: write |
13 | 13 | contents: write |
14 | 14 | steps: |
15 | | - - uses: actions/checkout@v3 |
| 15 | + - uses: actions/checkout@v4 |
16 | 16 | - name: Set up JDK 8 |
17 | 17 | uses: actions/setup-java@v3 |
18 | 18 | with: |
@@ -109,24 +109,25 @@ jobs: |
109 | 109 | - name: debug output directories |
110 | 110 | run: tree maven |
111 | 111 |
|
112 | | - - uses: actions/checkout@v3 |
| 112 | + - uses: actions/checkout@v4 |
113 | 113 | with: |
114 | 114 | repository: 'opensearch-project/opensearch-build-libraries' |
115 | 115 | path: 'build' |
| 116 | + ref: '9.6.2' |
116 | 117 |
|
117 | | - - name: Configure AWS credentials |
118 | | - uses: aws-actions/configure-aws-credentials@v2 |
| 118 | + - name: Load secret |
| 119 | + uses: 1password/load-secrets-action@v2 |
119 | 120 | with: |
120 | | - role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} |
121 | | - aws-region: us-east-1 |
| 121 | + # Export loaded secrets as environment variables |
| 122 | + export-env: true |
| 123 | + env: |
| 124 | + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |
| 125 | + SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username |
| 126 | + SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password |
122 | 127 |
|
123 | 128 | - name: Get credentials and publish snapshots to maven |
124 | 129 | run: | |
125 | | - export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) |
126 | | - export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) |
127 | | - echo "::add-mask::$SONATYPE_USERNAME" |
128 | | - echo "::add-mask::$SONATYPE_PASSWORD" |
129 | | - export SNAPSHOT_REPO_URL="https://aws.oss.sonatype.org/content/repositories/snapshots/" |
| 130 | + export SNAPSHOT_REPO_URL="https://central.sonatype.com/repository/maven-snapshots/" |
130 | 131 | build/resources/publish/publish-snapshot.sh $MAVEN_HOME |
131 | 132 |
|
132 | 133 |
|
0 commit comments