Conversation
Ushcode
left a comment
There was a problem hiding this comment.
- Update CI workflow
- Add a test passing check
- Clean up maven repository credentials
| PASSWORD: ${{github.token}} | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build docker image and push to ghcr | ||
| uses: docker/build-push-action@v6 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
| # Update version in code/pom.xml | ||
| POM_XML="code/pom.xml" | ||
| if [ -f "$POM_XML" ]; then | ||
| sed -i -E "s|<version>[0-9]+\.[0-9]+\.[0-9]+</version>|<version>$VERSION</version>|" "$POM_XML" | ||
| echo "Updated version in $POM_XML to $VERSION" | ||
| else | ||
| echo -e "\e[31mError\e[0m: $POM_XML not found" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
I think this can be removed if we make use of the mvnw script(s) to read the version number from the VERSION file and then append -Drevision=$VERSION onto the mvn calls.
There was a problem hiding this comment.
Okay cool I didn't actually look at your credo agent handling of this yet is that what you used there?
| # Update image version in docker-compose.yml | ||
| DOCKER_COMPOSE="docker-compose.yml" | ||
| if [ -f "$DOCKER_COMPOSE" ]; then | ||
| sed -i.bak -E "s|(image: .+:).+|\1$VERSION|" "$DOCKER_COMPOSE" && rm "$DOCKER_COMPOSE.bak" | ||
| echo "Updated image version in $DOCKER_COMPOSE to $VERSION" | ||
| else | ||
| echo -e "\e[31mError\e[0m: $DOCKER_COMPOSE not found" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Ideally this would be handled using a variable in the Docker compose file.
There was a problem hiding this comment.
Yeah probably better alright. I was thinking it was nice to see the changed file in PRs but probably pointless if compose file never changes otherwise
No description provided.