Skip to content

Update workflow.yml #36

Update workflow.yml

Update workflow.yml #36

Workflow file for this run

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_NUMBER
# Publish build info
jf rt bp --detailed-summary $BUILD_NAME $BUILD_NUMBER