api: Add storj failing proxy #742
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish task-runner docker images | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- dev | |
tags: | |
- "v*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
docker: | |
name: Build and publish docker image | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.CI_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.CI_DOCKERHUB_TOKEN }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
livepeer/${{ github.event.repository.name }} | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=sha | |
type=ref,event=pr | |
type=ref,event=tag | |
type=sha,format=long | |
type=ref,event=branch | |
type=semver,pattern={{version}},prefix=v | |
type=semver,pattern={{major}}.{{minor}},prefix=v | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value=${{ github.event.pull_request.head.ref }} | |
type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
build-args: | | |
version=${{ github.ref_type == 'tag' && github.ref_name || github.sha }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Notify new build upload | |
run: curl -X POST https://holy-bread-207a.livepeer.workers.dev |