-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from IBM-Security/auto-build
Auto build
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
############################################################################## | ||
# Copyright contributors to the IBM Security Verify Access AAC Authentication Policies project. | ||
|
||
# This workflow will be triggered whenever a push occurs (e.g. when a pull | ||
# request is merged). The action will build and publish the authentication policy | ||
# bundles. A release build is created whenever a new tag is created. The | ||
# name of the tag should be of the format v<year>.<month>.<fix> (with no | ||
# leading 0's), for example: v24.4.0. | ||
|
||
name: verify-access-aac-authentication-policies | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# The jobs for the workflow. | ||
jobs: | ||
|
||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the | ||
# job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can | ||
# access it | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Perform the build. | ||
- name: Perform the build. | ||
run: | | ||
echo "Create bundle-zip...." | ||
# Enter the authentication policies dir | ||
cd authentication_policies | ||
# For each one create a new zip fil of the contents without the readme | ||
for folder in * | ||
do | ||
if [ -d $folder ]; then | ||
echo "Bundling ${folder}" | ||
cd $folder | ||
zip -r "${folder%/}" * -x README.md | ||
mv "${folder}.zip" ../.. | ||
cd .. | ||
fi | ||
done | ||
# List the files created | ||
ls .. | ||
# Publish the release, if the release has been tagged. | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
*.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |