Skip to content

16948 update drought and flood exposure areas on dn2 (#99) #306

16948 update drought and flood exposure areas on dn2 (#99)

16948 update drought and flood exposure areas on dn2 (#99) #306

Workflow file for this run

name: test-and-build
on:
push:
branches:
- '**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Run tests
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: check
build-and-publish:
runs-on: ubuntu-latest
needs: test
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Build the app
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: build -x test
- name: Download OpenTelemetry agent
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: verifyFile
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
uses: docker/[email protected]
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.ref_name }}.{{sha}}.${{ github.run_attempt }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}