Skip to content

Commit 5e9a7ee

Browse files
committed
update documentation [skip ci]
1 parent dd95cd5 commit 5e9a7ee

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Allows to use Maven backed by AWS CodeArtifact repository in GitHub Actions:
88
Designed to be used in your build workflow (when you need to access packages from CodeArtifact)
99
and also it a release workflow (when you publish packages in CodeArtifact).
1010
It is recommended to use different IAM roles: `/ci/builder` and `/ci/publisher` respectfully.
11-
For release workflow you likely want to update a version in `pom.xml` file and add some git tags,
11+
For release workflow you likely want to bump a version in `pom.xml` file and add some git tags,
1212
so please check the `agilecustoms/release` action - it represents a holistic release action (uses `setup-maven-codeartifact` under the hood).
1313

1414
This action is a combination of few other actions mainly `actions/setup-java` and `aws-actions/configure-aws-credentials`,
15-
hence all parameters have prefix either `aws-` (for authorization in aws) or `java-` (for java-specific settings)
15+
hence all parameters have prefix either `java-` (for java-specific settings) or `aws-` (for authorization in aws)
1616

1717
## Usage in build workflow
1818
```yaml
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/checkout@v4
2828

2929
- name: Setup Java
30-
uses: agilecustoms/setup-maven-codeartifact@1.0.0
30+
uses: agilecustoms/setup-maven-codeartifact@v1
3131
with:
3232
aws-account: ${{ vars.AWS_ACCOUNT_DIST }}
3333
aws-region: us-east-1
@@ -42,7 +42,7 @@ jobs:
4242
## settings.xml for local development
4343
Under the hood, this action generates [settings.xml](./ci.settings.xml) file with CodeArtifact repository and credentials. Note:
4444
- maven central and its mirror are used as primary repositories for dependencies and plugins, your company CodeArtifact is in 3rd place
45-
- your company repository id has format `{aws-codeartifact-domain}-maven`
45+
- your company repository id has format `{aws-codeartifact-domain}-{aws-codeartifact-repository}`
4646

4747
With this knowledge, you can place a local version of [settings.xml](./local.settings.xml) on developers' machines
4848
to give them read-only access to maven packages in corporate CodeArtifact.

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ runs:
114114
echo "ARTIFACT_STORE_HOST=$HOST" >> $GITHUB_ENV
115115
REPO_ID="${{ inputs.aws-codeartifact-domain }}-${{ inputs.aws-codeartifact-repository }}"
116116
echo "REPO_ID=$REPO_ID" >> $GITHUB_OUTPUT
117+
# REPO_ID, TOKEN and HOST are used in settings.xml file (which used both in build and release jobs, just different IAM roles)
118+
# HOST is also used in parent pom.xml 'distributionManagement', so it is additionally put in env variable 'ARTIFACT_STORE_URL'.
119+
# Env variables are JOB-scoped, so it gets available in next step when you call 'mvn deploy'
117120

118121
- name: Generate Maven settings.xml
119122
shell: bash

0 commit comments

Comments
 (0)