Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

omfg awful

omfg awful #25

Workflow file for this run

name: POST submission
on:
push:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
env:
FN_PROB: "problems.txt"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.encoded.outputs.value }}
steps:
- uses: actions/checkout@v4
- run: make
- id: prob
run: |
make problems PROBLEMS=${{ env.FN_PROB }}
echo "ids=$(cat ${{ env.FN_PROB }})" >> $GITHUB_OUTPUT
- id: encoded
run: echo "value=${{ toJSON(steps.prob.outputs.ids) }}" >> $GITHUB_OUTPUT
- run: echo "${{ steps.encoded.outputs.value }}"
submit:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
value: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- run: echo "${{ matrix.value }}"
# 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 }}'