Skip to content

Commit

Permalink
Set workflow environment mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Jun 20, 2024
1 parent a063896 commit e09bcb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test-am-debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ on:
- "tests/archivematica/**"
- "!tests/archivematica/README.md"
- "!tests/archivematica/EL9/**"
env:
build_packages: "${{ github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.build_packages) }}"
jobs:
build-am-packages:
name: Build Archivematica packages
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -44,7 +46,7 @@ jobs:
build-ss-packages:
name: Build Storage Service packages
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -60,7 +62,7 @@ jobs:
create-package-repo:
name: Create package repository
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
needs:
- build-am-packages
- build-ss-packages
Expand Down Expand Up @@ -93,8 +95,6 @@ jobs:
needs: create-package-repo
runs-on: ubuntu-latest
if: "${{ always() }}"
env:
build_packages: ${{ inputs.build_packages }}
steps:
- name: Check if the repository creation job failed
if: "${{ needs.create-package-repo.result != 'skipped' && ! env.build_packages }}"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-am-rpms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ on:
- "tests/archivematica/**"
- "!tests/archivematica/README.md"
- "!tests/archivematica/jammy/**"
env:
build_packages: "${{ github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.build_packages) }}"
jobs:
build-am-packages:
name: Build Archivematica packages
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -44,7 +46,7 @@ jobs:
build-ss-packages:
name: Build Storage Service packages
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -60,7 +62,7 @@ jobs:
create-package-repo:
name: Create package repository
runs-on: ubuntu-latest
if: "${{ inputs.build_packages }}"
if: "${{ env.build_packages }}"
needs:
- build-am-packages
- build-ss-packages
Expand Down Expand Up @@ -93,8 +95,6 @@ jobs:
needs: create-package-repo
runs-on: ubuntu-latest
if: "${{ always() }}"
env:
build_packages: ${{ inputs.build_packages }}
steps:
- name: Check if the repository creation job failed
if: "${{ needs.create-package-repo.result != 'skipped' && ! env.build_packages }}"
Expand Down

0 comments on commit e09bcb6

Please sign in to comment.