Skip to content

Commit

Permalink
Add validate_repository script
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jun 28, 2024
1 parent 4d4110d commit 0c67585
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/deploy-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- name: Set environment variables
run: |
echo "ARTIFACT_PATH=${{ github.event.client_payload.name }}-${{github.event.client_payload.version}}.tar.gz" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifact
Expand All @@ -33,5 +32,15 @@ jobs:
run: |
mkdir repository
tar -xzvf $ARTIFACT_PATH -C repository
ls
tree repository
- name: Verify structure
uses: jbangdev/jbang-action@v0.115.0
with:
script: validate_repository.java
env:
ARTIFACT_DIR: ./repository
REPOSITORY: ${{ github.event.client_payload.github_repository }}
NAME: ${{ github.event.client_payload.name }}
VERSION: ${{ github.event.client_payload.version }}

- name: Deploy to Central
run: echo Invoke the deployment script here
9 changes: 9 additions & 0 deletions validate_repository.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.io.File;

public class validate_repository {

public static void main(String[] args) {
System.out.println(new File(System.getenv("ARTIFACT_DIR")).exists());
System.out.println("Hello, World");
}
}

0 comments on commit 0c67585

Please sign in to comment.