From 81b5234d7c1603ba7401353eb49acab4a1a1876d Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Tue, 1 Aug 2023 14:29:07 +1000 Subject: [PATCH] Add GA release workflow --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..2e2e4d2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +--- +name: "tagged-release" + +on: + push: + tags: + - "r*" + +jobs: + publish-image: + name: "Publish Docker Image to Docker Hub" + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: actions/checkout@v3 + - name: Push image + run: | + cd cassandra-4.0.6 + IMAGE_NAME=shotover/cassandra-test:4.0.6-${GITHUB_REF/refs\/tags\//} + docker build -t $IMAGE_NAME . + docker push $IMAGE_NAME + + cd ../cassandra-3.11.13 + IMAGE_NAME=shotover/cassandra-test:3.11.13-${GITHUB_REF/refs\/tags\//} + docker build -t $IMAGE_NAME . + docker push $IMAGE_NAME