Skip to content

Example Workflow using Compress Decompress v2 #16

Example Workflow using Compress Decompress v2

Example Workflow using Compress Decompress v2 #16

Workflow file for this run

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 }}"