diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 52b8f22d..2786153e 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -17,20 +17,24 @@ jobs: env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + + - name: Tags + id: tags + uses: livepeer/action-gh-release-tags@v0 + with: + force-latest: true + - name: Build the Docker image - # run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s) - run: docker build . --file Dockerfile --tag livepeer/streamtester:latest --build-arg version=$(git describe --dirty) - - name: Get tag name - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Tag version - if: startsWith(github.ref, 'refs/tags/v') run: | - docker tag livepeer/streamtester:latest livepeer/streamtester:${{ steps.get_version.outputs.VERSION }} - docker push livepeer/streamtester:${{ steps.get_version.outputs.VERSION }} + TAGS='${{ steps.tags.outputs.tags }}' + docker build . --file Dockerfile $(printf ' -t livepeer/streamtester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}" + - name: Push Docker Container to Registry - run: docker push livepeer/streamtester:latest + run: | + for TAG in ${{ steps.tags.outputs.tags }}; do + docker push livepeer/streamtester:$TAG + done - name: Notify that new build has been uploaded run: curl -X POST https://holy-bread-207a.livepeer.workers.dev diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 21974f6a..bfed0942 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,7 +1,7 @@ name: Publish new Release #on: [push] on: - push: + push: tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: @@ -9,10 +9,10 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - name: Set up Go 1.14 + - name: Set up Go 1.15 uses: actions/setup-go@v1 with: - go-version: 1.14 + go-version: 1.15 id: go - name: Check out code into the Go module directory @@ -55,10 +55,10 @@ jobs: needs: create_release steps: - - name: Set up Go 1.14 + - name: Set up Go 1.15 uses: actions/setup-go@v1 with: - go-version: 1.14 + go-version: 1.15 id: go - name: Check out code into the Go module directory @@ -76,7 +76,7 @@ jobs: make mapi make connector make loadtester - make recordtester + make recordtester - name: Compress Posix if: matrix.os != 'windows-latest' @@ -88,7 +88,7 @@ jobs: gzip -9 -S .${{runner.os}}.gz mapi gzip -9 -S .${{runner.os}}.gz recordtester gzip -9 -S .${{runner.os}}.gz mist-api-connector - + - name: Compress Windows if: matrix.os == 'windows-latest' run: | diff --git a/.github/workflows/load-tester-dockerimage.yml b/.github/workflows/load-tester-dockerimage.yml index 44d138a7..78aceca9 100644 --- a/.github/workflows/load-tester-dockerimage.yml +++ b/.github/workflows/load-tester-dockerimage.yml @@ -17,17 +17,21 @@ jobs: env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + + - name: Tags + id: tags + uses: livepeer/action-gh-release-tags@v0 + with: + force-latest: true + - name: Build the Docker image - # run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s) - run: docker build . --file Dockerfile.load-tester --tag livepeer/streamtester:load-tester --build-arg version=$(git describe --dirty) - - name: Get tag name - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Tag version - if: startsWith(github.ref, 'refs/tags/v') run: | - docker tag livepeer/streamtester:load-tester livepeer/streamtester:load-tester${{ steps.get_version.outputs.VERSION }} - docker push livepeer/streamtester:load-tester${{ steps.get_version.outputs.VERSION }} + TAGS='${{ steps.tags.outputs.tags }}' + docker build . --file Dockerfile.load-tester $(printf ' -t livepeer/loadtester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}" + - name: Push Docker Container to Registry - run: docker push livepeer/streamtester:load-tester + run: | + for TAG in ${{ steps.tags.outputs.tags }}; do + docker push livepeer/loadtester:$TAG + done diff --git a/.github/workflows/mist-api-connector-dockerimage.yml b/.github/workflows/mist-api-connector-dockerimage.yml index be2d79ba..16ae5fec 100644 --- a/.github/workflows/mist-api-connector-dockerimage.yml +++ b/.github/workflows/mist-api-connector-dockerimage.yml @@ -17,20 +17,24 @@ jobs: env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + + - name: Tags + id: tags + uses: livepeer/action-gh-release-tags@v0 + with: + force-latest: true + - name: Build the Docker image - # run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s) - run: docker build . --file Dockerfile.mist-api-connector --tag livepeer/streamtester:mist-api-connector --build-arg version=$(git describe --dirty) - - name: Get tag name - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Tag version - if: startsWith(github.ref, 'refs/tags/v') run: | - docker tag livepeer/streamtester:mist-api-connector livepeer/streamtester:mist-api-connector${{ steps.get_version.outputs.VERSION }} - docker push livepeer/streamtester:mistapiconnector${{ steps.get_version.outputs.VERSION }} + TAGS='${{ steps.tags.outputs.tags }}' + docker build . --file Dockerfile.mist-api-connector $(printf ' -t livepeer/mist-api-connector:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}" + - name: Push Docker Container to Registry - run: docker push livepeer/streamtester:mist-api-connector + run: | + for TAG in ${{ steps.tags.outputs.tags }}; do + docker push livepeer/mist-api-connector:$TAG + done - name: Notify that new build has been uploaded run: curl -X POST https://holy-bread-207a.livepeer.workers.dev diff --git a/.github/workflows/record-tester-dockerimage.yml b/.github/workflows/record-tester-dockerimage.yml index 7d268958..4d415781 100644 --- a/.github/workflows/record-tester-dockerimage.yml +++ b/.github/workflows/record-tester-dockerimage.yml @@ -17,25 +17,21 @@ jobs: env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + + - name: Tags + id: tags + uses: livepeer/action-gh-release-tags@v0 + with: + force-latest: true + - name: Build the Docker image - # run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s) - run: docker build . --file Dockerfile.record-tester --tag livepeer/streamtester:record-tester --build-arg version=$(git describe --dirty) - - name: Get tag name - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Tag version - if: startsWith(github.ref, 'refs/tags/v') run: | - docker tag livepeer/streamtester:record-tester livepeer/streamtester:record-tester${{ steps.get_version.outputs.VERSION }} - docker push livepeer/streamtester:record-tester${{ steps.get_version.outputs.VERSION }} - - name: Describe - id: describe - run: | - VER=$(git describe) - echo "version_from_git=$VER" >> $GITHUB_ENV + TAGS='${{ steps.tags.outputs.tags }}' + docker build . --file Dockerfile.record-tester $(printf ' -t livepeer/record-tester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}" + - name: Push Docker Container to Registry run: | - docker tag livepeer/streamtester:record-tester livepeer/streamtester:record-tester-${{ env.version_from_git }} - docker push livepeer/streamtester:record-tester - docker push livepeer/streamtester:record-tester-${{ env.version_from_git }} + for TAG in ${{ steps.tags.outputs.tags }}; do + docker push livepeer/record-tester:$TAG + done