Merge pull request #161 from querqy/usage_heat_bars #68
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: dockerhub-deployment | |
on: | |
push: | |
branches: master | |
jobs: | |
test-build-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch (full) | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: sbt | |
# enable experimental status for docker in order to support SMUI's backend tests that rely on Ryuk images | |
# (see https://github.com/actions/virtual-environments/issues/368) | |
- name: Docker experimental Status | |
run: | | |
docker version -f '{{.Server.Experimental}}' | |
- name: Docker restart (with experimental status) | |
run: | | |
sudo rm /etc/docker/daemon.json || true | |
echo $'{ "experimental": true }' | sudo tee /etc/docker/daemon.json | |
sudo service docker restart | |
docker version -f '{{.Server.Experimental}}' | |
- name: Setup NPM environment specfic to SMUI | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- run: npm i graceful-fs | |
- run: npm i resolve | |
- run: npm i esutils | |
- run: npm i semver | |
- name: Run tests | |
run: sbt test | |
# see https://github.community/t/github-actions-docker-login/16053/3 | |
- run: echo "${DOCKER_PASSWORD}" | docker login -u ${DOCKER_USERNAME} --password-stdin | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | |
# # see https://github.com/marketplace/actions/docker-login | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build & deploy SMUI | |
run: | | |
make docker-build-only | |
make docker-push |