blankl ine #22
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
name: ConfigHelper | |
on: push | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
init: | |
name: Init | |
runs-on: ubuntu-latest | |
outputs: | |
artifactId: ${{ steps.create.outputs.artifactId }} | |
steps: | |
- name: init | |
run: echo 'starting ${{ github.job }}' | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: stash action dir | |
uses: actions/upload-artifact@v4 | |
with: | |
name: actions | |
path: actions | |
- name: create config | |
id: create | |
uses: ./actions/example-config-updater | |
with: | |
mode: create | |
read: | |
name: Read | |
runs-on: ubuntu-latest | |
needs: [init] | |
outputs: | |
config: ${{ steps.read.outputs.config }} | |
steps: | |
- name: unstash action dir | |
uses: actions/download-artifact@v4 | |
with: | |
name: actions | |
path: actions | |
# - name: read config | |
# uses: ./actions/example-config-updater | |
# with: | |
# mode: read | |
# artifactId: ${{ needs.init.outputs.artifactId }} | |
- name: download config | |
uses: actions/download-artifact@v4 | |
with: | |
name: config | |
- name: read | |
run: | | |
echo 'config:' >> $GITHUB_STEP_SUMMARY | |
echo "'''" >> $GITHUB_STEP_SUMMARY | |
cat config.json >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "'''" >> $GITHUB_STEP_SUMMARY | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
needs: [read] | |
steps: | |
- name: unstash action dir | |
uses: actions/download-artifact@v4 | |
with: | |
name: actions | |
path: actions | |
- name: get the config outputs | |
run: | | |
echo "config: '${{ needs.read.outputs.config }}'" >> $GITHUB_STEP_SUMMARY | |
# See here for deleting artifacts: https://github.com/actions/upload-artifact/issues/550 |