Skip to content

Commit

Permalink
only build and publish docker container on commits to master and tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Sep 13, 2024
1 parent caaa3c2 commit 38485a4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- 'master'
tags:
- 'libp2p-server-**'
pull_request:

jobs:
server:
Expand Down Expand Up @@ -34,11 +33,6 @@ jobs:
with:
context: .
file: ./misc/server/Dockerfile
push: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} # Only push image if we have the required permissions, i.e. not running from a fork
cache-from: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && format('type=s3,mode=max,bucket={0},region=us-east-1,prefix=buildCache,name=rust-libp2p-server', vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME) }}
cache-to: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && format('type=s3,mode=max,bucket={0},region=us-east-1,prefix=buildCache,name=rust-libp2p-server', vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME) }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
env:
AWS_ACCESS_KEY_ID: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }}

0 comments on commit 38485a4

Please sign in to comment.