Skip to content

Commit

Permalink
chore: Disable build for other users
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan van Rooij committed Apr 14, 2020
1 parent f1cdc16 commit 4c669e7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
-
name: Set up Docker Buildx
id: buildx
Expand All @@ -25,6 +25,7 @@ jobs:
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Docker login (set DOCKER_USERNAME and DOCKER_PASSWORD in secrets)
if: ${{ success() && startsWith(github.repository, 'vouch/')}} # Remove this line, if you want everybody to publish to docker hub
run:
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
-
Expand All @@ -34,15 +35,15 @@ jobs:
docker buildx build \
--platform linux/arm/v7,linux/arm64 \
--push \
-f ./.build/Dockerfile \
-t voucher/vouch-proxy:$DOCKER_TAG \
.
-
name: Publish to docker as github_user/github_repo
if: ${{ success() && !startsWith(github.repository, 'vouch/')}}
run: |
docker buildx build \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--push \
-t $GITHUB_REPOSITORY:latest \
.
# Uncomment below to have github build to docker for every user. Watch out for indentation
# -
# name: Publish to docker as github_user/github_repo
# if: ${{ success() && !startsWith(github.repository, 'vouch/')}}
# run: |
# docker buildx build \
# --platform linux/amd64,linux/arm/v7,linux/arm64 \
# --push \
# -t $GITHUB_REPOSITORY:latest \
# .

0 comments on commit 4c669e7

Please sign in to comment.