Skip to content

Commit

Permalink
Merge pull request s3gw-tech#163 from m-ildefons/buildenv-workflow-cr…
Browse files Browse the repository at this point in the history
…edentials

ci: use credentials provided by caller
  • Loading branch information
jhmarina committed Sep 8, 2022
2 parents 57e4403 + 65abfc6 commit 10c8e84
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build-environment.yaml
Expand Up @@ -17,6 +17,16 @@ on:
required: false
default: "main"
type: string
dockerhub_username:
description: "A username to use for push to dockerhub"
required: true
default: ${{ secrets.DOCKERHUB_USERNAME }}
type: string
dockerhub_token:
description: "A token to use for push to dockerhub"
required: true
default: ${{ secrets.DOCKERHUB_TOKEN }}
type: string

jobs:
build:
Expand All @@ -37,8 +47,8 @@ jobs:
- name: Dockerhub Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_token }}

- name: Set Container Image Tag
id: tag
Expand All @@ -53,6 +63,6 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: mrohrich/buildenv-radosgw:${{ steps.tag.outputs.tag }}
tags: ${{ inputs.dockerhub_username }}/buildenv-radosgw:${{ steps.tag.outputs.tag }}
file: 'build/Dockerfile.build-radosgw'
context: 'build'

0 comments on commit 10c8e84

Please sign in to comment.