Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced usage of nonexistent access-om3-virtual package with access-om3 #6

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
# for each of the modules
for DEP in $DEPS; do
DEP_VER=''
if [[ "$DEP" == "access-om3-virtual" ]]; then
if [[ "$DEP" == "access-om3" ]]; then
DEP_VER=$(yq '.spack.specs[0] | split("@git.") | .[1]' spack.yaml)
else
DEP_VER=$(yq ".spack.packages.\"$DEP\".require[0] | split(\"@git.\") | .[1]" spack.yaml)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SPACK_YAML_MODEL_YQ: .spack.specs[0]
SPACK_YAML_MODEL_PROJECTION_YQ: .spack.modules.default.tcl.projections.access-om3-virtual
SPACK_YAML_MODEL_PROJECTION_YQ: .spack.modules.default.tcl.projections.access-om3
jobs:
bump-version:
name: Bump spack.yaml
Expand All @@ -31,7 +31,7 @@ jobs:
# version: The version that will be bumped (could be latest tag instead of original-version)
# bump: The bump type (major, minor or current as specified in the bump-version action)
run: |
# Get the version of access-om3-virtual from the spack.yaml in the PR the comment was written in
# Get the version of access-om3 from the spack.yaml in the PR the comment was written in
gh pr checkout ${{ github.event.issue.number }}
original_version=$(yq e '${{ env.SPACK_YAML_MODEL_YQ }} | split("@git.") | .[1]' spack.yaml)
echo "original-version=${original_version}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -79,10 +79,10 @@ jobs:
git config user.name ${{ vars.GH_ACTIONS_BOT_GIT_USER_NAME }}
git config user.email ${{ vars.GH_ACTIONS_BOT_GIT_USER_EMAIL }}

yq -i '${{ env.SPACK_YAML_MODEL_YQ }} = "access-om3-virtual@git.${{ steps.bump.outputs.after }}"' spack.yaml
yq -i '${{ env.SPACK_YAML_MODEL_YQ }} = "access-om3@git.${{ steps.bump.outputs.after }}"' spack.yaml
yq -i '${{ env.SPACK_YAML_MODEL_PROJECTION_YQ }} = "{name}/${{ steps.bump.outputs.after }}"' spack.yaml
git add spack.yaml
git commit -m "spack.yaml: Updated access-om3-virtual package version from ${{ steps.setup.outputs.original-version }} to ${{ steps.bump.outputs.after }}"
git commit -m "spack.yaml: Updated access-om3 package version from ${{ steps.setup.outputs.original-version }} to ${{ steps.bump.outputs.after }}"
git push

- name: Success Notifier
Expand Down