Skip to content

Commit

Permalink
Unify GitHub action workflows, upgrade versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pathob committed Mar 18, 2024
1 parent 184c2b7 commit 81c7719
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 142 deletions.
62 changes: 36 additions & 26 deletions .github/workflows/ci_main.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: CI Main
name: CI

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
package:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -35,23 +39,24 @@ jobs:
unit-tests:
needs: package

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -63,19 +68,21 @@ jobs:
integration-tests:
needs: package

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
# The integration test is not compatible with Java 17
java-version: 11
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -87,7 +94,9 @@ jobs:
deploy:
needs: [unit-tests, integration-tests]

runs-on: ubuntu-20.04
if: github.event_name == 'push' # to 'main'

runs-on: ubuntu-22.04

env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
Expand All @@ -99,16 +108,17 @@ jobs:
SIGN_ASC_IV: ${{ secrets.SIGN_ASC_IV }}

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -126,7 +136,7 @@ jobs:
apcc:
needs: deploy

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
Expand All @@ -135,10 +145,10 @@ jobs:
java-version: 11

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand Down
115 changes: 0 additions & 115 deletions .github/workflows/ci_pull_request.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ConfAPI for Jira
================

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.aservo.atlassian/confapi-jira-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.aservo.atlassian/confapi-jira-plugin)
[![Build Status](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci_main.yaml/badge.svg)](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci_main.yaml)
[![Build Status](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci.yaml/badge.svg)](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci.yaml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=aservo_confapi-jira-plugin&metric=coverage)](https://sonarcloud.io/dashboard?id=aservo_confapi-jira-plugin)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=aservo_confapi-jira-plugin&metric=alert_status)](https://sonarcloud.io/dashboard?id=aservo_confapi-jira-plugin)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Expand Down

0 comments on commit 81c7719

Please sign in to comment.