fix(deps): update dependency org.testcontainers:testcontainers to v1.… #617
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
name: build | |
concurrency: release | |
on: | |
push: | |
branches: ["master"] | |
permissions: | |
contents: write | |
env: | |
SERVICE_NAME: account | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
# TODO: create a separate job that would submit the dependency graph. Having this here prevents config cache reuse in branch builds. | |
dependency-graph: generate-and-submit | |
- name: Build | |
run: ./gradlew build --stacktrace --scan | |
env: | |
DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: runtimeClasspath | |
- name: Upload code coverage report to coveralls | |
run: ./gradlew codeCoverageReport coveralls --no-configuration-cache | |
env: | |
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} | |
GITHUB_DEPENDENCY_GRAPH_ENABLED: false | |
# TODO: below need refactoring to not use ::set-output | |
- name: Prepare Release | |
id: release_config | |
run: | | |
git fetch --unshallow | |
echo "::set-output name=version::$(infrastructure/next-version.sh)" | |
changes="$(infrastructure/changes-since-last-release.sh)" | |
echo $changes | |
changes="${changes//'%'/'%25'}" | |
changes="${changes//$'\n'/'%0A'}" | |
changes="${changes//$'\r'/'%0D'}" | |
echo $changes | |
echo "::set-output name=changes::$changes" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.release_config.outputs.version }} | |
release_name: ${{ steps.release_config.outputs.version }} | |
body: | | |
${{ steps.release_config.outputs.changes }} | |
draft: false | |
- name: Publish | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} | |
VERSION: ${{ steps.release_config.outputs.version }} | |
run: | | |
docker tag ${SERVICE_NAME}:snapshot $DOCKER_USER/$SERVICE_NAME:$VERSION | |
docker tag ${SERVICE_NAME}:snapshot $DOCKER_USER/$SERVICE_NAME | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
docker push $DOCKER_USER/$SERVICE_NAME:$VERSION | |
docker push $DOCKER_USER/$SERVICE_NAME |