Skip to content

Commit f9a3afb

Browse files
committed
wip - fix moar
1 parent 210b355 commit f9a3afb

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/publish-python-packages.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ on:
77
- '**/pyproject.toml'
88
- 'packages/**/__about__.py'
99
inputs:
10-
aws_account_id:
11-
description: The AWS account ID that owns the CodeArtifact domain
12-
type: string
13-
required: false
14-
default: 505071440022
15-
aws_region:
16-
description: The AWS region where the CodeArtifact repository is hosted
17-
type: string
18-
required: false
19-
default: us-west-2
2010
aws_iam_role_name:
2111
description: The name of the IAM role to assume for accessing CodeArtifact
2212
type: string
@@ -33,7 +23,6 @@ on:
3323
required: false
3424
default: overture
3525

36-
3726
permissions:
3827
id-token: write
3928
contents: read
@@ -65,13 +54,19 @@ jobs:
6554
- name: Sync code to make packages visible to Python
6655
run: uv sync --all-packages
6756

57+
- name: Configure AWS credentials
58+
uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
aws-region: ${{ inputs.aws_region }}
61+
role-to-assume: arn:aws:iam::505071440022:role/GithubActions_Schema_CodeArtifact_Publish
62+
role-session-name: GitHubActions_${{github.job}}_${{github.run_id}}
63+
6864
- name: Get CodeArtifact index URL
6965
id: get-code-artifact-index-url
7066
run: |
7167
echo 'index_url<<EOF' >> $GITHUB_OUTPUT
7268
./.github/workflows/scripts/get-code-artifact-index-url.sh \
73-
"${{ inputs.aws_account_id }}" "${{ inputs.aws_region }}" \
74-
"${{ inputs.domain }}" "${{ inputs.repository }}" >> $GITHUB_OUTPUT
69+
505071440022 us-west-2 overture-pypi overture >> $GITHUB_OUTPUT
7570
echo EOF >> $GITHUB_OUTPUT
7671
7772
- name: Publish package ${{ matrix.package }} version ${{ matrix.after }} to PyPI

.github/workflows/reusable-check-python-package-versions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
printf 'num_changed_packages=%s\n' "$(jq -c '. | length' /tmp/package-version-diff.json)" >> $GITHUB_OUTPUT
113113
114114
- name: Configure AWS credentials
115+
if: {{ steps.save-changes.outputs.num_changed_packages != '0' }}
115116
uses: aws-actions/configure-aws-credentials@v4
116117
with:
117118
aws-region: ${{ inputs.aws_region }}
@@ -120,6 +121,7 @@ jobs:
120121

121122
- name: Get CodeArtifact index URL
122123
id: get-code-artifact-index-url
124+
if: {{ steps.save-changes.outputs.num_changed_packages != '0' }}
123125
run: |
124126
echo 'index_url<<EOF' >> $GITHUB_OUTPUT
125127
./.github/workflows/scripts/get-code-artifact-index-url.sh \
@@ -128,6 +130,7 @@ jobs:
128130
echo EOF >> $GITHUB_OUTPUT
129131
130132
- name: Fail if any of the new versions already exist in the repo
133+
if: {{ steps.save-changes.outputs.num_changed_packages != '0' }}
131134
run: |
132135
echo TODO: TEMP: VERIFY: "${{ steps.get-code-artifact-index-url.outputs.index_url }}" TODO DELETE THIS DO NOT MERGE
133136
jq -c '.[]' /tmp/package-version-diff.json | while read -r entry; do
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.1.1.dev0"
1+
__version__ = "0.1.0"
22

33
# TEMPORARY COMMENT updated, again, and again, and again, and again, and again, and again, and again, and again

0 commit comments

Comments
 (0)