chore: bump go-openaudio to pick up ETL stem fixes (OpenAudio/go-open… #2664
This file contains hidden or 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 Docker Image | |
| on: | |
| # Only build/push images on main. Previously this ran on every push to every | |
| # branch ("**"), producing a full amd64 + arm64 multi-arch build, push, and | |
| # GitHub Release for every feature-branch commit — by far the largest source | |
| # of Actions spend in this repo. Feature-branch images are not consumed by any | |
| # deploy; use the manual trigger below to build one on demand when needed. | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| # Serialize main builds; a newer main push supersedes an older in-flight build. | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-amd64: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: audius/api | |
| tags: | | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},suffix=-amd64 | |
| type=sha,prefix=,suffix=-amd64 | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=audius/api:buildcache-amd64 | |
| cache-to: type=registry,ref=audius/api:buildcache-amd64,mode=max | |
| build-args: | | |
| GIT_SHA=${{ github.sha }} | |
| platforms: linux/amd64 | |
| build-arm64: | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: audius/api | |
| tags: | | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},suffix=-arm64 | |
| type=sha,prefix=,suffix=-arm64 | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=audius/api:buildcache-arm64 | |
| cache-to: type=registry,ref=audius/api:buildcache-arm64,mode=max | |
| build-args: | | |
| GIT_SHA=${{ github.sha }} | |
| platforms: linux/arm64 | |
| push-manifest: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| needs: [build-amd64, build-arm64] | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: audius/api | |
| tags: | | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=sha,prefix= | |
| - name: Extract arch builds metadata for Docker | |
| id: arch-meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: audius/api | |
| tags: | | |
| type=sha,prefix=,suffix=-amd64 | |
| type=sha,prefix=,suffix=-arm64 | |
| - name: Create and push Docker manifest | |
| run: | | |
| OUTPUT_TAGS="$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ' ')" | |
| INPUT_TAGS="$(echo "${{ steps.arch-meta.outputs.tags }}" | tr '\n' ' ')" | |
| TAG_ARGS="" | |
| for tag in $OUTPUT_TAGS; do | |
| TAG_ARGS="$TAG_ARGS --tag $tag" | |
| done | |
| echo "docker buildx imagetools create $TAG_ARGS $INPUT_TAGS" | |
| docker buildx imagetools create $TAG_ARGS $INPUT_TAGS | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get short SHA for release | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Create GitHub Release | |
| if: github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ env.SHORT_SHA }} | |
| name: "Build ${{ env.SHORT_SHA }}" | |
| body: "Automated release generated after Docker image push." | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |