Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Create a Docker image on DockerHub on release to stable

Richard Bealesbc09ce93eb07
diff --git a/.github/workflows/dockerhub-imagepush.yml b/.github/workflows/dockerhub-imagepush.yml
new file mode 100644
index 0000000000..6805eebfc3
--- /dev/null
+++ b/.github/workflows/dockerhub-imagepush.yml
@@ -0,0 +1,24 @@
+name: Push Docker Image on Release
+
+on:
+ push:
+ branches: [ "stable" ]
+
+jobs:
+
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Log in to Docker hub
+ env:
+ DOCKER_USER: ${{secrets.DOCKER_USER}}
+ DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
+ run: |
+ docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
+ - name: Build the Docker image
+ run: docker build . --file Dockerfile --tag ${{secrets.DOCKER_USER}}/auto-gpt:$(git describe --tags `git rev-list --tags --max-count=1`)
+ - name: Docker Push
+ run: docker push ${{secrets.DOCKER_USER}}/auto-gpt