Skip to content

Commit

Permalink
lab/ci-artifacts: uploader/downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Dec 29, 2022
1 parent fa540d6 commit 9c2da9a
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/lab-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Lab Artifacts
'on':
pull_request:
push:
branches:
- master
tags:
- '*'
schedule:
- cron: "0 5 * * 0"

jobs:

uploader:
name: Uploader
runs-on: ubuntu-latest
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF##*/}

- name: create tarball
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
pwd
echo $VERSION > file.txt
mkdir build;
tar cfz build/mtulio-okd_installer-$VERSION.tar.gz file.txt
mv -v build/mtulio-okd_installer-$VERSION.tar.gz \
/tmp/mtulio-okd_installer-latest.tar.gz
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: mtulio-okd_installer.tar.gz
path: /tmp/mtulio-okd_installer-latest.tar.gz

downloader:
runs-on: ubuntu-latest
needs: [uploader]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: mtulio-okd_installer.tar.gz
path: /tmp/mtulio-okd_installer.tar.gz

- name: show files
env:
VERSION: latest
run: |
pwd
echo "list: "
ls
echo "list tmp: "
ls /tmp
echo "list tmp..: "
ls /tmp/mtulio-okd_installer.tar.gz
#echo "find: "
#find / -iname mtulio-okd_installer.tar.gz 2>/dev/null || true
echo "file type: "
file /tmp/mtulio-okd_installer.tar.gz
file /tmp/mtulio-okd_installer.tar.gz/mtulio-okd_installer.tar.gz
echo "uncompress: "
tar xfz /tmp/mtulio-okd_installer.tar.gz/mtulio-okd_installer.tar.gz -C ./
echo "list: "
ls
echo "show: "
cat file.txt

0 comments on commit 9c2da9a

Please sign in to comment.