Skip to content

Commit

Permalink
Merge pull request #2 from IBM-Security/auto-build
Browse files Browse the repository at this point in the history
Auto build
  • Loading branch information
kerrygunn committed Mar 27, 2024
2 parents b7e11aa + d66c5e9 commit be01139
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
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 }}

0 comments on commit be01139

Please sign in to comment.