Skip to content
rotate-cw

GitHub Action

Sync Maven

v1.2.2 Latest version

Sync Maven

rotate-cw

Sync Maven

Synchronize Maven Dependencies

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Sync Maven

uses: guoshiqiufeng/github-action-sync-maven@v1.2.2

Learn more about this action in guoshiqiufeng/github-action-sync-maven

Choose a version

Github Action Sync Maven

CodeQL Check Transpiled JavaScript

This Action is used to synchronize dependencies to maven repositories.

Parameters

  • repositories
    • Required. The maven repositories to synchronize to.
    • default value: https://repo1.maven.org/maven2/
  • dependenciesJson
    • Required. The dependencies to synchronize. Is a configured json array.
    • json format
      • groupId Required
      • artifactId Required
      • version Required
      • packaging
        • default value: jar
        • Optional values:jarpom
      • transitive
        • default value: true
        • Optional values:truefalse

Use the Action

   name: "Sync Maven"
   on:
     push:
       branches:
         - main
   jobs:
     build:
       runs-on: ubuntu-latest
       steps:
         - name: Set up Maven
           uses: stCarolas/setup-maven@v4.5
           with:
             maven-version: 3.9.5
         - uses: guoshiqiufeng/github-action-sync-maven@v1
           with:
             repositories: 'https://maven.aliyun.com/repository/public'
             dependenciesJson: '[{"groupId":"io.github.guoshiqiufeng", "artifactId":"loki", "version":"0.8.1"},{"groupId":"io.github.guoshiqiufeng", "artifactId":"loki-spring-boot-starter", "version":"0.8.1"}]'