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

chore(ci): change from circle ci to github actions #8

Merged
merged 10 commits into from
Mar 25, 2022

Conversation

tomaszbaron
Copy link
Contributor

@tomaszbaron tomaszbaron commented Mar 17, 2022

https://riverigaming.atlassian.net/browse/RTFE-5983

.github/workflows/frontend-build-and-publish-casinos-and-cashier.yml workflow is designed to build WL, brands and cashier
https://github.com/River-iGaming/midgard.white-label/pull/2237
https://github.com/River-iGaming/vanir.cashier/pull/305
https://github.com/River-iGaming/odin.asgard.client/pull/741

.github/workflows/frontend-build-and-publish-libs.yml workflow is designed to build odin.ngx, midgard.ngx and vanir.ngx
https://github.com/River-iGaming/odin.ngx/pull/1099
https://github.com/River-iGaming/midgard.ngx/pull/299
https://github.com/River-iGaming/vanir.ngx/pull/173

.github/workflows/frontend-build-and-tag-configs.yml workflow is designed to build midgard.client.config and can be used also for vanir.config but I don't have write rights to this repo.
https://github.com/River-iGaming/midgard.client.config/pull/127
https://github.com/River-iGaming/odin.asgard.client.config/pull/16

.github/workflows/frontend-build-and-publish-lib.yml Outdated Show resolved Hide resolved
.github/workflows/frontend-build-and-publish-lib.yml Outdated Show resolved Hide resolved
Comment on lines 79 to 94
- name: Fetch git tags
if: ${{ steps.commit.outputs.publishable == 'true' }}
run: |
git fetch --prune --unshallow --tags

- name: Check if tag exists
id: tag
if: ${{ steps.commit.outputs.publishable == 'true' }}
run: |
TAG=$(node -p "require('./lerna.json').version")
if git tag --list | grep "^$TAG$"; then
echo "::set-output name=publishable::false"
echo "Tag already exists. Please make sure you bump version!"
else
echo "::set-output name=publishable::true"
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably all be replaced with a dedicated check git tag action:
https://github.com/marketplace/actions/tag-exists-action
https://github.com/marketplace/actions/github-tag-check
Haven't tried these myself so not sure if it serves your purpose

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used first one

.github/workflows/frontend-build-and-publish-lib.yml Outdated Show resolved Hide resolved
exit 0
fi

git fetch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part wasn't tested

- name: Git Tag
if: ${{ steps.branch.outputs.publishable == 'true' }}
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part wasn't tested

env:
ECR_HOST: ${{ steps.login-ecr.outputs.registry }}
run: |
TAG=$(node -p "require('./storybook/package.json').version")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, the docker image is created, but I wasn't able to check if the storybook is accessible

@@ -0,0 +1,186 @@
name: Frontend Build and Publish Casino and Cashier
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be apps, can we try with bo too please? as they have the same configuration

Copy link
Contributor Author

@tomaszbaron tomaszbaron Mar 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the file name and also added workflows to odin.asgard.client.config and odin.asgard.client
https://github.com/River-iGaming/odin.asgard.client.config/pull/16
https://github.com/River-iGaming/odin.asgard.client/pull/741

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vanir.config has also the same Circle CI config but I don't have writhe right to the repo

@tomaszbaron tomaszbaron merged commit 13ea506 into main Mar 25, 2022
@tomaszbaron tomaszbaron deleted the feature/RTFE-5983-fronted-lib branch March 25, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants