Skip to content

Integrate building Docker image in release workflow #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/docker.yml

This file was deleted.

28 changes: 22 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ jobs:
with:
distribution: 'zulu'
java-version: 11
cache: 'maven'
# Value of the distributionManagement/repository/id field of the pom.xml
server-id: sonatype-nexus-staging
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
server-username: OSS_USERNAME
server-password: OSS_PASSWORD
gpg-passphrase: GPG_PASSPHRASE
- uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Setup Git
run: |
git config --global committer.email "noreply@github.com"
Expand All @@ -48,3 +43,24 @@ jobs:
run: |
./mvnw -B release:rollback -Prelease -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}
echo "You may need to manually delete the GitHub tag, if it was created."
docker:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
ref: ${{ github.event.inputs.releaseVersion }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build & Push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
openapitools/openapi-diff:${{ github.event.inputs.releaseVersion }}
openapitools/openapi-diff:latest