Skip to content

Commit

Permalink
Adding basic reusable workflow to test out functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanMNoguera committed Jul 27, 2022
1 parent fc6f120 commit 35a8082
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test Workflow

on:
# Triggers the workflow when called from organization repository
workflow_call:
inputs:
test_param:
required: false
default: 'value'
type: string

jobs:
release:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch all tags
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github actions"
git fetch --tags --unshallow --prune
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_tag=v${{github.run_number}}
gh release create $latest_tag --generate-notes
publish:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

steps:
# Checkout Project
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: Project
run: |
pwd
ls
cd ..
ls
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
.idea
4 changes: 4 additions & 0 deletions etc/docs/example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TEST FILE
- 1
- 2
- 3
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>am-reusable-workflows</groupId>
<artifactId>reusable_workflows</artifactId>
<version>1.0-SNAPSHOT</version>


</project>

0 comments on commit 35a8082

Please sign in to comment.