-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated configuration to no longer have to manage snowflake as a sepa…
…rate extension since it is available in liquibase-core as of 4.12.0
- Loading branch information
Showing
4 changed files
with
0 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,48 +35,3 @@ jobs: | |
with: | ||
repo-token: ${{ secrets.BOT_TOKEN }} | ||
|
||
# automation steps for liquibase-snowflake extension | ||
- name: Get SNOWFLAKE_TARGET_VERSION from PR | ||
if: ${{ steps.metadata.outputs.dependency-name == 'org.liquibase.ext:liquibase-snowflake' }} | ||
run: | | ||
echo 'SNOWFLAKE_TARGET_VERSION<<EOF' >> $GITHUB_ENV | ||
gh pr view "$PR_URL" | grep "Bump liquibase-snowflake" | awk '{ print $7 }' >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.BOT_TOKEN}} | ||
|
||
- name: Compute sha1 for snowflake-extension.jar | ||
if: ${{ steps.metadata.outputs.dependency-name == 'org.liquibase.ext:liquibase-snowflake' }} | ||
run: | | ||
echo 'SNOWFLAKE_TARGET_SHA<<EOF' >> $GITHUB_ENV | ||
curl -LsS https://repo1.maven.org/maven2/org/liquibase/ext/liquibase-snowflake/$SNOWFLAKE_TARGET_VERSION/liquibase-snowflake-$SNOWFLAKE_TARGET_VERSION.jar | sha1sum | awk '{ print $1 }' >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- name: edit liquibase-snowflake Dockerfile | ||
if: ${{ steps.metadata.outputs.dependency-name == 'org.liquibase.ext:liquibase-snowflake' }} | ||
run: | | ||
sed -i 's/^FROM liquibase/liquibase:.*/FROM liquibase/liquibase:'"$SNOWFLAKE_TARGET_VERSION"'/' ${{ github.workspace }}/snowflake/Dockerfile | ||
sed -i 's/^ARG SNOWFLAKE_EXTENSION_VERSION=.*/ARG SNOWFLAKE_EXTENSION_VERSION='"$SNOWFLAKE_TARGET_VERSION"'/' ${{ github.workspace }}/snowflake/Dockerfile | ||
sed -i 's/^ARG SNOWFLAKE_EXTENSION_SHA1=.*/ARG SNOWFLAKE_EXTENSION_SHA1='"$SNOWFLAKE_TARGET_SHA"'/' ${{ github.workspace }}/snowflake/Dockerfile | ||
- name: push Dockerfile edit back to PR | ||
if: ${{ steps.metadata.outputs.dependency-name == 'org.liquibase.ext:liquibase-snowflake' }} | ||
run: | | ||
git config --global user.name "github_actions" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "auto-update liquibase-snowflake Dockerfile" | ||
git push -u origin HEAD:"$GITHUB_HEAD_REF" | ||
env: | ||
GITHUB_HEAD_REF: ${{github.head_ref}} | ||
|
||
- name: Bump version and push tag | ||
if: ${{ steps.metadata.outputs.dependency-name == 'org.liquibase.ext:liquibase-snowflake' }} | ||
id: tag_version2 | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.BOT_TOKEN }} | ||
create_annotated_tag: true | ||
custom_tag : ${{env.SNOWFLAKE_TARGET_VERSION}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.