Skip to content

Commit

Permalink
Lesson: don't use chatgpt to build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bmamlin committed Oct 4, 2024
1 parent debd3df commit f7e344e
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ on:
branches: [ "master" ]

jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: openmrs_concepts_1_11.zip
path: openmrs_concepts_1_11.zip

build:
runs-on: ubuntu-latest
needs: prepare
services:
mysql:
image: mysql:5.7
Expand Down Expand Up @@ -56,24 +66,19 @@ jobs:
PROFILE: ${{ matrix.PROFILE }}
FILE_SUFFIX: ${{ matrix.FILE_SUFFIX }}
TWO_STEP: ${{ matrix.TWO_STEP }}
- name: Archive build artifacts locally
run: |
mkdir -p ${{ github.workspace }}/artifacts
mv openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip ${{ github.workspace }}/artifacts/
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip
path: openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip

merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge all zip files into a single exports.zip
run: |
cd ${{ github.workspace }}/artifacts
zip ../exports.zip ./*.zip
- name: Clean up temporary artifacts
run: |
rm -rf ${{ github.workspace }}/artifacts
- name: Upload final merged artifact
uses: actions/upload-artifact@v4
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: exports.zip
path: ${{ github.workspace }}/exports.zip
name: exports
pattern: openmrs_concepts_*.zip
delete-merged: true

0 comments on commit f7e344e

Please sign in to comment.