Skip to content

Commit

Permalink
Dynamic charts repo ref
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbasson committed Jan 31, 2024
1 parent 2c41f7f commit ce142a3
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,33 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Determine branch
id: set_branch
uses: actions/github-script@v5
with:
script: |
const { GITHUB_TOKEN } = process.env;
const { context } = require('@actions/github');
const github = require('@actions/github').getOctokit(GITHUB_TOKEN);
const branch = 'standardise-roles';
try {
await github.rest.repos.getBranch({
owner: context.repo.owner,
repo: context.repo.repo,
branch: branch,
});
return branch;
} catch (error) {
return 'master';
}
- name: Checkout Charts
uses: actions/checkout@v4
with:
repository: didx-xyz/charts
token: ${{ secrets.PAT }}
path: charts
ref: standardise-roles
ref: ${{ steps.set_branch.outputs.result }}

- name: Install dependencies
run: sudo apt-get install -y postgresql-client redis-tools
Expand Down

0 comments on commit ce142a3

Please sign in to comment.