Skip to content

Commit

Permalink
use repo name when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
mpwsh committed Oct 4, 2023
1 parent f05c822 commit e1ad726
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Release Image
on:
push:
branches:
- mpw/cicd
- main
- release
paths-ignore:
Expand All @@ -15,7 +14,7 @@ concurrency:
env:
SERVICE_NAME: uploads
CACHE_CONFIG: type=s3,region=${{ vars.AWS_REGION }},bucket=${{ vars.AWS_BUCKET }},access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }},secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOCKERHUB_REPO: ${{ vars.DOCKERHUB_ORG }}/${{ env.SERVICE_NAME }}
DOCKERHUB_REPO: ${{ vars.DOCKERHUB_ORG }}/${{ github.event.repository.name }}

jobs:
build:
Expand Down Expand Up @@ -50,17 +49,18 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build and push ${{ env.SERVICE_NAME }}
- name: Build and push ${{ github.event.repository.name }}
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile

push: true
provenance: false
platforms: linux/${{ matrix.arch }}
tags: ${{ env.DOCKERHUB_REPO }}:latest-${{ matrix.arch }}
cache-from: ${{ env.CACHE_CONFIG }},prefix=buildx/${{ env.SERVICE_NAME }}/${{ matrix.arch }}/
cache-to: ${{ env.CACHE_CONFIG }},prefix=buildx/${{ env.SERVICE_NAME }}/${{ matrix.arch }}/,mode=max
cache-from: ${{ env.CACHE_CONFIG }},prefix=buildx/hub-ui/${{ matrix.arch }}/
cache-to: ${{ env.CACHE_CONFIG }},prefix=buildx/hub-ui/${{ matrix.arch }}/,mode=max

finalize:
needs: build
Expand Down

0 comments on commit e1ad726

Please sign in to comment.