From 9e2577a9908e56808d84624de516a9134400891b Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Tue, 4 Apr 2023 15:45:31 +0200 Subject: [PATCH] Push and pull to ghcr.io to hasten builds --- .github/workflows/system-tests.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index ec49d235eb9..e49622fda6c 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -26,6 +26,10 @@ jobs: uses: actions/checkout@v3 with: repository: 'DataDog/system-tests' + # - name: Pull image + # run: | + # docker pull ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:latest + # docker tag ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:latest system_tests/${{ matrix.image }}:latest - name: Build image run: ./build.sh --images ${{ matrix.image }} - name: Export image @@ -39,6 +43,14 @@ jobs: name: docker-image-${{ matrix.image }}-${{ github.run_id }}-${{ github.sha }} path: images/* retention-days: 1 + - name: Log in to the Container registry + run: | + echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin + - name: Push image + # if: ${{ github.ref == 'refs/heads/master' }} + run: | + docker tag system_tests/${{ matrix.image }}:latest ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:latest + docker push ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:latest build-apps: strategy: @@ -74,6 +86,10 @@ jobs: uses: actions/checkout@v3 with: path: 'binaries/dd-trace-rb' + # - name: Pull image + # run: | + # docker pull ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:${{ matrix.app }} + # docker tag ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:${{ matrix.app }} system_tests/${{ matrix.image }} - name: Log in to the Container registry run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin @@ -90,6 +106,11 @@ jobs: name: docker-image-${{ matrix.image }}-${{ matrix.app }}-${{ github.run_id }}-${{ github.sha }} path: images/* retention-days: 1 + - name: Push image + # if: ${{ github.ref == 'refs/heads/master' }} + run: | + docker tag system_tests/${{ matrix.image }} ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:${{ matrix.app }} + docker push ghcr.io/datadog/dd-trace-rb/system-tests/${{ matrix.image }}:${{ matrix.app }} test: strategy: