From 1252472e0554786801e16b322af1fa955ddcc449 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:34:00 +0100 Subject: [PATCH] optimize "release" workflow build binaries once for both GitHub and Docker Hub --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fd9947e..1da7326f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: go mod tidy git diff --exit-code - github: + make_binaries: needs: check_gortsplib runs-on: ubuntu-20.04 @@ -32,6 +32,23 @@ jobs: - run: make binaries + - uses: actions/upload-artifact@v3 + with: + name: binaries + path: binaries + + github: + needs: make_binaries + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v3 + with: + name: binaries + path: binaries + - uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -60,13 +77,16 @@ jobs: } dockerhub: - needs: check_gortsplib + needs: make_binaries runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - run: make binaries + - uses: actions/download-artifact@v3 + with: + name: binaries + path: binaries - run: make dockerhub env: @@ -74,7 +94,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} apidocs: - needs: check_gortsplib + needs: make_binaries runs-on: ubuntu-20.04 steps: