Fix workflow

This commit is contained in:
Adria Navarro 2023-06-20 12:48:52 +01:00
parent aa3294f08e
commit a4ce3f5e35
1 changed files with 5 additions and 5 deletions

View File

@ -142,21 +142,21 @@ jobs:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
- name: Check pro commit - name: Check pro commit
id: pro_commit id: get_pro_commits
run: | run: |
cd submodule cd submodule
pro_commit=$(git rev-parse HEAD) pro_commit=$(git rev-parse HEAD)
latest_commit=$(git rev-parse origin/develop) latest_commit=$(git rev-parse origin/develop)
echo "::set-output name=pro_commit::$pro_commit" echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
echo "::set-output name=latest_commit::$latest_commit" echo "latest_commit=$latest_commit" >> "$GITHUB_OUTPUT"
- name: Check submodule merged to develop - name: Check submodule merged to develop
uses: actions/github-script@v4 uses: actions/github-script@v4
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
script: | script: |
const submoduleCommit = '${{ steps.pro_commit.outputs.pro_commit }}'; const submoduleCommit = '${{ steps.get_pro_commits.outputs.pro_commit }}';
const latestCommit = '${{ steps.pro_commit.outputs.latest_commit }}'; const latestCommit = '${{ steps.get_pro_commits.outputs.latest_commit }}';
if (submoduleCommit !== latestCommit) { if (submoduleCommit !== latestCommit) {
console.error('Submodule commit does not match the latest commit on the develop branch.'); console.error('Submodule commit does not match the latest commit on the develop branch.');