Update workflow.yml #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "JFrog CLI Example" | |
on: push | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create zip | |
run: | | |
zip -r -q folder${{ github.run_number }}.zip folder1 | |
ls -ltr | |
- name: Create tar | |
run: | | |
tar -czvf folder${{ github.run_number }}.tar.gz folder2 | |
ls -ltr | |
- uses: jfrog/setup-jfrog-cli@v3 | |
env: | |
# JFrog platform url (for example: https://acme.jfrog.io) | |
JF_URL: ${{ secrets.JF_URL }} | |
# JFrog Platform access token | |
#JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} | |
# Basic authentication credentials | |
JF_USER: ${{ secrets.JF_USER }} | |
JF_PASSWORD: ${{ secrets.JF_PASSWORD }} | |
- name: Verify Artifactory is accessible | |
run: jf rt ping | |
- name: Upload to Artifactory | |
run: | | |
jf rt upload "*.zip" brianw-generic-local/ --detailed-summary --fail-no-op --build-name $BUILD_NAME --build-number $BUILD_NUMBER | |
jf rt upload "*.tar.gz" brianw-generic-local/ --detailed-summary --fail-no-op --build-name $BUILD_NAME --build-number $BUILD_NUMBER | |
#jf rt bp --detailed-summary | |
- name: Publish build info | |
run: | | |
# Collect VCS details from git and add them to the build | |
jf rt build-add-git --build-name $BUILD_NAME --build-number $BUILD_NUMBER | |
# Publish build info | |
jf rt bp --detailed-summary --build-name $BUILD_NAME --build-number $BUILD_NUMBER |