-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(build): Add DockerHub login and proxy settings
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 }} | ||
|
@@ -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'] }}` |