Skip to content

Commit

Permalink
Constify.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Jan 23, 2025
1 parent 39c0fc6 commit cc723a8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/update-k8s-deployments/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,29 @@ runs:
with:
github-token: ${{ inputs.push-token }}
script: |
const owner = 'dfinity-ops';
const repo = 'k8s';
const base = 'main';
const pulls = await github.rest.pulls.list({
owner: 'dfinity-ops',
repo: 'k8s',
base: 'main',
owner: owner,
repo: repo,
base: base,
head: '${{ steps.create-rollout-commit.outputs.k8s_branch }}'
});
if (pulls.length > 0) {
const result = await github.rest.pulls.update({
owner: 'dfinity-ops',
repo: 'k8s',
owner: owner,
repo: repo,
pull_number: pulls[0]["number"],
body: 'Updating container images to incorporate [these changes](https://github.com/${{ github.repository }}/compare/${{ steps.create-rollout-commit.outputs.previous_ref }}..${{ steps.create-rollout-commit.outputs.current_ref }}).',
});
} else {
const result = await github.rest.pulls.create({
title: '[nomrbot] - New ${{ inputs.component }} release from ${{ github.repository }}',
owner: 'dfinity-ops',
repo: 'k8s',
owner: owner,
repo: repo,
head: '${{ steps.create-rollout-commit.outputs.k8s_branch }}',
base: 'main',
base: base,
maintainer_can_modify: true,
body: 'Updating container images to incorporate [these changes](https://github.com/${{ github.repository }}/compare/${{ steps.create-rollout-commit.outputs.previous_ref }}..${{ steps.create-rollout-commit.outputs.current_ref }}).'
});
Expand Down

0 comments on commit cc723a8

Please sign in to comment.