Skip to content

Commit

Permalink
ci(build): Add DockerHub login and proxy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian M. Todie committed Jul 20, 2023
1 parent 79851a7 commit b4cb485
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to container registry
uses: docker/login-action@v2.1.0
- name: Login to GitHub container registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub container registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get base registry
run: |
echo "REGISTRY=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
Expand All @@ -67,7 +72,10 @@ jobs:
uses: docker/[email protected]
with:
context: ${{ inputs.folder }}
build-args: ${{ inputs.build-args }}
build-args: |-
${{ inputs.build-args }}
http_proxy=${{ secrets.HTTP_PROXY }}
https_proxy=${{ secrets.HTTPS_PROXY }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -80,10 +88,10 @@ jobs:
- name: Comment
if: steps.PR.outputs.number
uses: peter-evans/[email protected]
with:
with:
issue-number: ${{ steps.PR.outputs.number }}
body: >
@${{ github.triggering_actor }} Build complete, ${{ steps.docker-build.outcome }}:
@${{ github.triggering_actor }} Build complete, ${{ steps.docker-build.outcome }}:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Image: `${{ fromJSON(steps.docker-build.outputs.metadata)['image.name'] }}`
Image: `${{ fromJSON(steps.docker-build.outputs.metadata)['image.name'] }}`

0 comments on commit b4cb485

Please sign in to comment.