-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 2.24 KB
/
publish-dev-docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Publish DEV Docker Image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
create-docker-image:
name: Create Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: microsoft
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FARM21_API_TOKEN: ${{ secrets.FARM21_API_TOKEN }}
SOILSCOUT_USERNAME: ${{ secrets.SOILSCOUT_USERNAME }}
SOILSCOUT_PASSWORD: ${{ secrets.SOILSCOUT_PASSWORD }}
AGRANIMO_USERNAME: ${{ secrets.AGRANIMO_USERNAME }}
AGRANIMO_PASSWORD: ${{ secrets.AGRANIMO_PASSWORD }}
SENTEK_API_TOKEN: ${{ secrets.SENTEK_API_TOKEN }}
AGVOLUTION_USERNAME: ${{ secrets.AGVOLUTION_USERNAME }}
AGVOLUTION_PASSWORD: ${{ secrets.AGVOLUTION_PASSWORD }}
SENSOTERRA_USERNAME: ${{ secrets.SENSOTERRA_USERNAME }}
SENSOTERRA_PASSWORD: ${{ secrets.SENSOTERRA_PASSWORD }}
API_KEY: ${{ secrets.API_KEY }}
WEENAT_USERNAME: ${{ secrets.WEENAT_USERNAME }}
WEENAT_PASSWORD: ${{ secrets.WEENAT_PASSWORD }}
MICROSTREAM_STORAGE_DIRECTORY: ./microstream-integration-test
IMAGE_PATH_BASE_URL: localhost:8080/images
run: mvn -B verify --file pom.xml --settings .github/settings.xml
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: develop
- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
file: .github/dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}