From 823f7f89ac25eadd3f9bf44d3a4a8e6c5dd67821 Mon Sep 17 00:00:00 2001 From: Jiahui Hu Date: Tue, 17 Oct 2023 14:43:03 -0400 Subject: [PATCH] combine npm and docker publish (#130) * combine npm and docker publisj test run on pr * Update npm_and_docker_publish.yml Testing * Test successful. Ready to release * Remove docker_publish.yml --------- Co-authored-by: Jamie Li --- .github/workflows/docker_publish.yml | 25 -------------------- .github/workflows/npm_and_docker_publish.yml | 16 ++++++++++--- @stellar/anchor-tests/package.json | 2 +- 3 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/docker_publish.yml diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml deleted file mode 100644 index 281ce90..0000000 --- a/.github/workflows/docker_publish.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: docker image publish -on: - workflow_dispatch: - workflow_call: - -jobs: - build_and_push_docker_image: - name: Push to DockerHub (tag=stellar/anchor-tests:${{ github.event.release.tag_name }}) - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - - name: Docker Login - uses: docker/login-action@v2.1.0 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker images - uses: docker/build-push-action@v4.0.0 - with: - push: true - tags: stellar/anchor-tests:${{ github.event.release.tag_name }},stellar/anchor-tests:latest - file: Dockerfile - diff --git a/.github/workflows/npm_and_docker_publish.yml b/.github/workflows/npm_and_docker_publish.yml index 0adef62..7398892 100644 --- a/.github/workflows/npm_and_docker_publish.yml +++ b/.github/workflows/npm_and_docker_publish.yml @@ -1,4 +1,4 @@ -name: npm and docker publish +name: npm and docker build and publish on: release: types: [published] @@ -27,5 +27,15 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Publish docker image - uses: ./.github/workflows/docker_publish.yml \ No newline at end of file + - name: Docker Login + uses: docker/login-action@v2.1.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v4.0.0 + with: + push: true + tags: stellar/anchor-tests:${{ github.event.release.tag_name }},stellar/anchor-tests:latest + file: Dockerfile diff --git a/@stellar/anchor-tests/package.json b/@stellar/anchor-tests/package.json index 0210b4a..c1f3baa 100644 --- a/@stellar/anchor-tests/package.json +++ b/@stellar/anchor-tests/package.json @@ -1,6 +1,6 @@ { "name": "@stellar/anchor-tests", - "version": "0.6.4", + "version": "0.6.5", "description": "stellar-anchor-tests is a library and command line interface for testing Stellar anchors.", "main": "./lib/index.js", "types": "./lib/index.d.ts",