-
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 secret inheritence
- Loading branch information
Christian M. Todie
committed
Jul 21, 2023
1 parent
79851a7
commit 68ee399
Showing
14 changed files
with
39 additions
and
19 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
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,8 @@ jobs: | |
uses: docker/[email protected] | ||
with: | ||
context: ${{ inputs.folder }} | ||
build-args: ${{ inputs.build-args }} | ||
build-args: |- | ||
${{ inputs.build-args }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
@@ -80,10 +86,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'] }}` |
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
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
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
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
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
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
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
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
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
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
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
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