Merge branch 'master' into adopt-and-use-hashes #4
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: | |
- '**' | |
workflow_dispatch: | |
inputs: | |
clean_build: | |
description: 'build all' | |
required: false | |
default: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref_name != 'master' }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
env: | |
# define Java options for both official sbt and sbt-extras | |
JAVA_OPTS: -XX:MinRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0 -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
JVM_OPTS: -XX:MinRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0 -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
SBT_NATIVE_CLIENT: "true" | |
steps: | |
- id: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
fetch-tags: true | |
sparse-checkout-cone-mode: false | |
# set vars | |
- name: set vars | |
uses: ./.github/actions/set_vars | |
with: | |
clean_build: ${{ github.event.inputs.clean_build }} | |
- name: Setup Scala | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "21" | |
distribution: 'temurin' | |
- name: restore cache | |
uses: ./.github/actions/scala_restore_cache | |
with: | |
clean_build: ${{ github.event.inputs.clean_build }} | |
- name: Setup M2 Credentials | |
run: mkdir -p ~/.m2 && echo ${{secrets.M2_CREDENTIALS}} | base64 -d > ~/.m2/.credentials | |
- name: set branch | |
run: | | |
branch="$(echo -n ${{ github.event.ref }} | sed 's#refs/heads/##g; s#/#-#g' | tr '[:upper:]' '[:lower:]')" | |
echo "branch=\"${branch}\"" >> $GITHUB_ENV | |
- name: set new version | |
run: | | |
if [[ ${{env.branch}} == "master" ]]; then | |
version="$(date +'%Y.%m.%d')-${{github.run_number}}" | |
else | |
version="$(date +'%Y.%m.%d')-${branch}-${{github.run_number}}" | |
fi | |
version=$(echo $version | sed 's/"//g') | |
echo "version=$version" | |
echo "version=$version" >> $GITHUB_ENV | |
- run: | | |
echo "version in ThisBuild := \"${{env.version}}\"" > version.sbt | |
- run: sbt +outboxProcessor/docker:publishLocal | |
- run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASS}} quay.io | |
- run: docker push quay.io/whisk/outbox-processor:${{env.version}} | |
- name: label vcs | |
run: git tag $version && git push --tag | |
- name: Save Scala Cache | |
uses: ./.github/actions/scala_save_cache | |