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 67ccc7f
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/lab-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: Lab Artifacts
'on':
pull_request:
push:
branches:
- master
tags:
- '*'
schedule:
- cron: "0 5 * * 0"

defaults:
run:
working-directory: 'mtulio.labs'

jobs:

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

- name: create tarball
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
echo $RELEASE_VERSION > file.txt
mkdir build;
tar cfz build/mtulio-okd_installer-$RELEASE_VERSION.tar.gz file.txt
mv -v build/mtulio-okd_installer-$RELEASE_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:
name: Releaser Container(latest)
runs-on: ubuntu-latest
needs: [uploader]
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}

- 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 mtulio-okd_installer.tar.gz
echo "find: "
find / -iname mtulio-okd_installer.tar.gz
echo "file type: "
file mtulio-okd_installer.tar.gz

0 comments on commit 67ccc7f

Please sign in to comment.