aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/publish.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/publish.yml')
-rw-r--r--.github/workflows/publish.yml28
1 files changed, 19 insertions, 9 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 142207f..903b9de 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -11,17 +11,27 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
+ - name: Generate tag
+ run: echo "CUSTOM_DOCKER_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
+ - name: Convert repo name to lower case
+ run: |
+ IMG=$(echo $DOCKER_IMAGE_ORIG | awk '{print tolower($0)}')
+ echo "CUSTOM_DOCKER_IMAGE=${IMG}" >> $GITHUB_ENV
+ env:
+ DOCKER_IMAGE_ORIG: ${{ github.repository }}
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v1
with:
- java-version: 1.8
- - name: Build
- run: ./gradlew :central:distTar
- - uses: ncipollo/release-action@v1.7.3
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.CR_PAT }}
+ - name: Build and push central Docker image
+ uses: docker/build-push-action@v2.2.1
with:
- allowUpdates: true
- artifacts: "./central/build/distributions/central-*.tar"
- token: ${{ secrets.GITHUB_TOKEN }}
+ tags: ghcr.io/${{ env.CUSTOM_DOCKER_IMAGE }}:${{ env.CUSTOM_DOCKER_TAG }}
+ push: true
build_agent:
runs-on: ubuntu-latest
steps: