Skip to content

chore(deps): update eclipse-temurin docker tag to v21 #411

chore(deps): update eclipse-temurin docker tag to v21

chore(deps): update eclipse-temurin docker tag to v21 #411

Workflow file for this run

name: ci
on:
workflow_dispatch:
push:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v2
- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- run: ./gradlew check
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- run: ./gradlew shadowJar
- run: ./gradlew dockerBuildProperties
- run: cat build/build.properties
- name: Build container
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: blindern/users-api:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- run: scripts/docker-test-image.sh blindern/users-api:latest
- name: Push container
if: github.ref == 'refs/heads/master'
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: blindern/users-api:latest
- name: Deploy
if: github.ref == 'refs/heads/master'
run: |
curl --fail -L -i -H "authorization: bearer $DEPLOYER_TOKEN" -H "content-type: application/json" -X POST https://deployer.foreningenbs.no/deploy -d '
{
"service": "users-api",
"attributes": {
"image": "blindern/users-api@${{ steps.docker_build.outputs.digest }}"
}
}'
env:
DEPLOYER_TOKEN: ${{ secrets.DEPLOYER_TOKEN }}