Skip to content

Commit 83078cf

Browse files
authored
Integrate building Docker image in release workflow (#286)
Refs #280
1 parent 54102da commit 83078cf

File tree

2 files changed

+22
-35
lines changed

2 files changed

+22
-35
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@ jobs:
2323
with:
2424
distribution: 'zulu'
2525
java-version: 11
26+
cache: 'maven'
2627
# Value of the distributionManagement/repository/id field of the pom.xml
2728
server-id: sonatype-nexus-staging
2829
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
2930
server-username: OSS_USERNAME
3031
server-password: OSS_PASSWORD
3132
gpg-passphrase: GPG_PASSPHRASE
32-
- uses: actions/cache@v2.1.6
33-
with:
34-
path: ~/.m2/repository
35-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
36-
restore-keys: |
37-
${{ runner.os }}-maven-
3833
- name: Setup Git
3934
run: |
4035
git config --global committer.email "noreply@github.com"
@@ -48,3 +43,24 @@ jobs:
4843
run: |
4944
./mvnw -B release:rollback -Prelease -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}
5045
echo "You may need to manually delete the GitHub tag, if it was created."
46+
docker:
47+
needs: release
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v2.4.0
51+
ref: ${{ github.event.inputs.releaseVersion }}
52+
- name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v1
54+
- name: Login to DockerHub
55+
uses: docker/login-action@v1
56+
with:
57+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
58+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
59+
- name: Build & Push Docker image
60+
uses: docker/build-push-action@v2
61+
with:
62+
context: .
63+
push: true
64+
tags: |
65+
openapitools/openapi-diff:${{ github.event.inputs.releaseVersion }}
66+
openapitools/openapi-diff:latest

0 commit comments

Comments
 (0)