generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (74 loc) · 2.15 KB
/
use-action-v2.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Example Workflow using Compress Decompress v2
on:
workflow_dispatch:
inputs:
run:
description: 'workflow run'
required: true
default: 'true'
permissions:
contents: read
jobs:
acton-module-compress:
runs-on: ubuntu-latest
env:
TEST_SOURCE: test3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Local Compress Action
uses: somaz94/compress-decompress@v1
id: compress
with:
command: 'compress'
source: './${{ env.TEST_SOURCE }}'
format: 'zip'
includeRoot: 'false'
- name: Verify File Existence
run: ls -la ${{ github.workspace }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: compressed-data
path: ./${{ env.TEST_SOURCE }}/${{ env.TEST_SOURCE }}.zip
acton-module-decompress:
runs-on: ubuntu-latest
needs: acton-module-compress
env:
TEST_SOURCE: test3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: compressed-data
- name: Test Local Decompress Action
uses: somaz94/compress-decompress@v1
id: decompress
with:
command: 'decompress'
source: './${{ env.TEST_SOURCE }}.zip'
format: 'zip'
dest: './unpacked'
- name: Display Content of the Unpacked Files
run: |
ls -la ${{ github.workspace }}/unpacked
cat ${{ github.workspace }}/unpacked/${{ env.TEST_SOURCE }}.txt
- name: Test Local Compress Action
id: compress
uses: ./
with:
command: 'compress'
source: './test2'
format: 'tgz'
- name: List contents in the workspace
run: ls -la ${{ github.workspace }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: compressed-data-2
path: ./test2.tgz
- name: Print Output
run: |
echo "compress file path result: ${{ steps.compress.outputs.file_path }}"