-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docker-publish-tagged.yml): add dockerhub action
- Loading branch information
1 parent
d0f7be2
commit fad9855
Showing
1 changed file
with
39 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "DockerHub" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v?[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: integrated-reasoning | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: integratedreasoning/mps | ||
|
||
- name: Build and push Docker image | ||
run: | | ||
nix build .#image.x86_64-linux | ||
docker load -i ./result | ||
docker image tag mps:latest integratedreasoning/mps:latest | ||
docker push integratedreasoning/mps:latest |