Upload File Plugins Release Process #189
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: Upload File Plugins Release Process | |
on: | |
workflow_dispatch: | |
inputs: | |
fileName: | |
type: string | |
description: File Name (ucv-ext-abc:1.0.0) | |
required: true | |
folderName: | |
type: string | |
description: Folder Name (ucv-ext-abc) | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check disk space | |
run: df . -h | |
- name: Free disk space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Create Folder | |
run: | | |
mkdir files | |
mkdir "files/${{ github.event.inputs.folderName }}" | |
- name: Docker Pull Image | |
run: | | |
docker pull "urbancode/${{ github.event.inputs.fileName }}" | |
- uses: actions/checkout@v3 | |
- name: Docker Save as TAR | |
run: | | |
docker save -o "${{ github.event.inputs.fileName }}.tar" "urbancode/${{ github.event.inputs.fileName }}" | |
ls -a | |
mkdir -p "files/${{ github.event.inputs.folderName }}" | |
mv "./${{ github.event.inputs.fileName }}.tar" "files/${{ github.event.inputs.folderName }}/" | |
cd files/${{ github.event.inputs.folderName }}/ | |
ls -a | |
- uses: edgarrc/action-7z@v1 | |
with: | |
args: 7z a -v50m "./files/${{ github.event.inputs.folderName }}/${{ github.event.inputs.fileName }}.tar.7z" "./files/${{ github.event.inputs.folderName }}/${{ github.event.inputs.fileName }}.tar" | |
- name: Commit changes | |
run: | | |
git init | |
git config --global user.email "lalit-ku@hcl.com" | |
git config --global user.name "lalitKumarHCL" | |
git add *.00* | |
git commit -m "adding ${{ github.event.inputs.fileName }}" | |
git branch -M main | |
git push -u origin main |