This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
use right id maybe #15
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: POST submission | ||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
branches: [ main ] | ||
env: | ||
FN_PROB: "problems.txt" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.prob.outputs.ids }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: make | ||
- id: prob | ||
run: | | ||
make problems PROBLEMS=${{ env.FN_PROB }} | ||
echo "ids=$(cat ${{ env.FN_PROB }})" >> $GITHUB_OUTPUT | ||
- run: echo "${{ steps.prob.outputs.ids }}" | ||
submit: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
pid: ${{ steps.build.outputs.matrix }} # run once for each known problem id | ||
Check failure on line 30 in .github/workflows/submit.yaml GitHub Actions / POST submissionInvalid workflow file
|
||
steps: | ||
- id: content | ||
run: echo "body=$(cat build/${{ matrix.pid }}.txt)" >> $GITHUB_OUTPUT | ||
- name: post solution | ||
run: | | ||
echo "${{ matrix.pid }}" | ||
echo "${{ steps.content.outputs.body }}" | ||
# curl --location '${{ vars.BASE_URL }}submission' \ | ||
# --header ${{ secrets.TOKEN }} \ | ||
# --header 'Content-Type: text/plain' \ | ||
# --data '${{ steps.content.outputs.body }}' | ||