-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.05 KB
/
publish-docker.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
name: Publish Docker Image
on:
workflow_dispatch:
push:
paths:
- 'gradle.properties'
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Extract version from gradle.properties
id: extract_version
run: |
VERSION=$(grep '^projectVersion=' gradle.properties | cut -d'=' -f2)
echo "version=$VERSION" >> $GITHUB_ENV
- name: Log in to GitHub Docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: |
docker build -t ghcr.io/rdf-connect/orchestrator:${{ env.version }} .
- name: Push the Docker image
run: |
docker push ghcr.io/rdf-connect/orchestrator:${{ env.version }}