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

internal-test-2 #126

Merged
merged 12 commits into from
Nov 10, 2023
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
22 changes: 19 additions & 3 deletions .github/workflows/internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,28 @@ jobs:
run: |
curl -vkL -o - https://github.com/intuit/auto/releases/download/v10.46.0/auto-linux.gz | gunzip > /usr/local/bin/auto && \
chmod +x /usr/local/bin/auto; \
- name: update_composite_tags
- name: get_version
id: get_version
env:
GITHUB_TOKEN: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
run: |
VERSION=`auto version`
echo "version will be $VERSION"
npm run update-composite-tags $VERSION
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "major_version=$(echo $VERSION | cut -d '.' -f 1)" >> $GITHUB_OUTPUT
- name: update_composite_tags
run: |
echo "update-composite-tags with ${{ steps.get_version.outputs.version }}"
npm run update-composite-tags ${{ steps.get_version.outputs.version }}
- name: version_docker
uses: ./.github/actions/version_docker
with:
github_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
github_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
# We reset the major tag so workflow consumers automatically receive these changes
- name: update_major_tag
# If the versions are equal, then we know this is a new major version
if: ${{ steps.get_version.outputs.version != steps.get_version.outputs.major_version }}
run: |
echo "update_major_tag with ${{ steps.get_version.outputs.major_version }}"
git tag -f ${{ steps.get_version.outputs.major_version }}
git push origin ${{ steps.get_version.outputs.major_version }} --force
35 changes: 0 additions & 35 deletions .github/workflows/internal_test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion bin/update-composite-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const TAG_VERSION = process.argv.slice(2)[0];
const updateFlow = async (fileName) => {
const pathToPrFlow = `${pathToWorkflows}/${fileName}`;
const workflow = await readFile(pathToPrFlow, 'utf8');
const newWorkflow = workflow.replace(/(jupiterone\/.github\/.github\/actions.*@).*/g, `$1v${TAG_VERSION}`);
const tagVersion = TAG_VERSION.replace('v', '');
const newWorkflow = workflow.replace(/(jupiterone\/.github\/.github\/actions.*@).*/g, `$1v${tagVersion}`);

await writeFile(pathToPrFlow, newWorkflow);
};
Expand Down