-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Bozarth <[email protected]>
- Loading branch information
Showing
2 changed files
with
59 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: push-manifest | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image_name: | ||
description: "Which docker image to push to" | ||
required: true | ||
type: string | ||
release_tag: | ||
description: "Which docker tag to push to" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push multiarch image to ghcr.io | ||
run: | | ||
docker manifest create ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }} \ | ||
--amend ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }}-x86_64 \ | ||
--amend ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }}-arm64 && | ||
docker manifest push ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }} | ||
- name: Push multiarch image to DockerHub | ||
run: | | ||
docker manifest create openquantumsafe/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }} \ | ||
--amend openquantumsafe/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }}-x86_64 \ | ||
--amend openquantumsafe/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }}-arm64 && | ||
docker manifest push openquantumsafe/${{ inputs.image_name }}:${{ inputs.release_tag || 'latest' }} |