Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
chore: add pipeline for publishing scripts (#31)
Browse files Browse the repository at this point in the history
* chore: add pipeline for publishing scripts

* allow manual publish for branch
  • Loading branch information
lippertmarkus authored Jul 13, 2021
1 parent ad5af95 commit 88aa1d1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release scripts

on:
push:
tags:
- v*
workflow_dispatch:

jobs:
upload:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Determine major version to publish
id: majorver
run: |
tag=$(basename $GITHUB_REF)
if [[ $GITHUB_REF == *"/tags/"* ]]; then
echo "::set-output name=major::${tag%.*.*}"
else
# Use branch name as major if not triggered for a tag
echo "::set-output name=major::$tag"
fi
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
filename: 'docker-swarm-${{ steps.majorver.outputs.major }}.zip'
path: scripts

- uses: bacongobbler/[email protected]
with:
source_dir: .
container_name: swarm-scripts
account_name: ccppi
sas_token: ${{ secrets.SasToken }}
extra_args: '--pattern *.zip'
sync: false

0 comments on commit 88aa1d1

Please sign in to comment.