-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: initial github container registry integration guide (#7088)
* docs: initial github container registry integration guide Signed-off-by: Luke Marsden <me@lukemarsden.net> * docs: fix link to main.go Signed-off-by: Luke Marsden <me@lukemarsden.net> * docs: hopefully convince linter this isn't a real go file Signed-off-by: Luke Marsden <me@lukemarsden.net> * Update docs/current_docs/integrations/snippets/ghcr-workflow.yml Co-authored-by: vikram-dagger <112123850+vikram-dagger@users.noreply.github.com> Signed-off-by: lukemarsden <me@lukemarsden.net> * Integrates examplein to GitHub Actions integ page Signed-off-by: Vikram Vaswani <vikram@dagger.io> * rename Signed-off-by: Luke Marsden <me@lukemarsden.net> * bump tag Signed-off-by: Luke Marsden <me@lukemarsden.net> --------- Signed-off-by: Luke Marsden <me@lukemarsden.net> Signed-off-by: lukemarsden <me@lukemarsden.net> Signed-off-by: Vikram Vaswani <vikram@dagger.io> Co-authored-by: vikram-dagger <112123850+vikram-dagger@users.noreply.github.com> Co-authored-by: Vikram Vaswani <vikram@dagger.io>
- Loading branch information
1 parent
3285542
commit 379e812
Showing
3 changed files
with
44 additions
and
2 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,35 @@ | ||
name: dagger | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Call Dagger Function to build and publish to ghcr.io | ||
uses: dagger/dagger-for-github@v5 | ||
with: | ||
version: "latest" | ||
verb: call | ||
# modify to use different function(s) as needed | ||
module: github.com/daggerverse/dagger-ghcr-demo@v0.1.5 | ||
args: build-and-push --registry=$DOCKER_REGISTRY --image-name=$DOCKER_IMAGE_NAME --username=$DOCKER_USERNAME --password=env:DOCKER_PASSWORD --build-context=github.com/daggerverse/dagger-ghcr-demo | ||
# assumes the Dagger Cloud token is in | ||
# a repository secret named DAGGER_CLOUD_TOKEN | ||
# set via the GitHub UI/CLI | ||
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | ||
env: | ||
DOCKER_REGISTRY: ghcr.io | ||
DOCKER_IMAGE_NAME: ${{ github.repository }} | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
# assumes the container registry password is in | ||
# a repository secret named REGISTRY_PASSWORD | ||
# set via the GitHub UI/CL | ||
DOCKER_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} |
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