-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (50 loc) · 1.78 KB
/
uploadFile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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