Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

CI: Release to dockerhub on release (#531)

Kilian Lieret43e8c5d49479
diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml
index 0990af83..9588b709 100644
--- a/.github/workflows/check-links.yaml
+++ b/.github/workflows/check-links.yaml
@@ -1,6 +1,7 @@
name: Check Markdown links
on:
+ workflow_dispatch:
push:
pull_request:
schedule:
diff --git a/.github/workflows/release-dockerhub.yaml b/.github/workflows/release-dockerhub-nightly.yaml
similarity index 69%
rename from .github/workflows/release-dockerhub.yaml
rename to .github/workflows/release-dockerhub-nightly.yaml
index 88d3cc65..504d25e3 100644
--- a/.github/workflows/release-dockerhub.yaml
+++ b/.github/workflows/release-dockerhub-nightly.yaml
@@ -1,11 +1,15 @@
-name: Release to dockerhub
+name: Release to dockerhub (nightly)
on:
+ workflow_dispatch:
schedule:
- cron: '0 0 * * *'
+ push:
+ tags:
+ - 'v*.*.*'
jobs:
- login:
+ release:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
diff --git a/.github/workflows/release-dockerhub-release.yaml b/.github/workflows/release-dockerhub-release.yaml
new file mode 100644
index 00000000..ea3e0f50
--- /dev/null
+++ b/.github/workflows/release-dockerhub-release.yaml
@@ -0,0 +1,22 @@
+name: Release to dockerhub (release)
+
+on:
+ push:
+ tags:
+ - 'v*.*.*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Login to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: sweagent
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Get release name
+ run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
+ - name: Run release script
+ run: ./release_dockerhub.sh sweagent ${{ env.RELEASE_VERSION }}
\ No newline at end of file
diff --git a/README.md b/README.md
index eca204d0..ebea8527 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,9 @@ MIT. Check `LICENSE`.
[![Pytest](https://github.com/princeton-nlp/SWE-agent/actions/workflows/pytest.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/pytest.yaml)
[![Test build containers](https://github.com/princeton-nlp/SWE-agent/actions/workflows/test_build_containers.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/test_build_containers.yaml)
-[![Release to dockerhub](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub.yaml)
+[![Release to dockerhub (nightly)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub.yaml)
+[![Release to dockerhub (nightly)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub-nightly.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub-nightly.yaml)
+[![Release to dockerhub (release)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub-release.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/release-dockerhub-release.yaml)
[![build-docs](https://github.com/princeton-nlp/SWE-agent/actions/workflows/build-docs.yaml/badge.svg)](https://github.com/princeton-nlp/SWE-agent/actions/workflows/build-docs.yaml)
[![codecov](https://codecov.io/gh/princeton-nlp/SWE-agent/graph/badge.svg?token=18XAVDK365)](https://codecov.io/gh/princeton-nlp/SWE-agent)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/princeton-nlp/SWE-agent/main.svg)](https://results.pre-commit.ci/latest/github/princeton-nlp/SWE-agent/main)