diff --git a/.github/workflows/docker.yaml b/.github/workflows/btc-node.yaml similarity index 50% rename from .github/workflows/docker.yaml rename to .github/workflows/btc-node.yaml index fa3e783..447502f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/btc-node.yaml @@ -1,9 +1,11 @@ -name: Docker Image CI +name: Upload btc-node on: push: + branches: + - main paths: - - 'containers/**' + - 'containers/btc-node/**' jobs: docker: @@ -14,13 +16,11 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: - context: ./containers/wasabi-clients/2.0.4/ - file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + context: "{{ defaultContext }}:containers/btc-node" push: true - tags: ${{ secrets.DOCKER_USERNAME }}/wasabi-client:latest \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/btc-node:latest \ No newline at end of file diff --git a/.github/workflows/wasabi-backend.yaml b/.github/workflows/wasabi-backend.yaml new file mode 100644 index 0000000..f1db2c7 --- /dev/null +++ b/.github/workflows/wasabi-backend.yaml @@ -0,0 +1,26 @@ +name: Upload wasabi-backend + +on: + push: + branches: + - main + paths: + - 'containers/wasabi-backend/**' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: "{{ defaultContext }}:containers/wasabi-backend" + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/wasabi-backend:latest \ No newline at end of file diff --git a/.github/workflows/wasabi-clients.yaml b/.github/workflows/wasabi-clients.yaml new file mode 100644 index 0000000..9d10b1b --- /dev/null +++ b/.github/workflows/wasabi-clients.yaml @@ -0,0 +1,45 @@ +name: Upload wasabi-clients + +on: + push: + branches: + - main + paths: + - 'containers/wasabi-clients/**' + +jobs: + list-wasabi-versions: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: List Wasabi versions + id: list-versions + run: | + cd containers/wasabi-clients + VERSIONS=$(ls -d */ | cut -f1 -d'/' | sort -V | jq -R . | jq -s . | tr -d '\n ') + echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT" + outputs: + versions: ${{ steps.list-versions.outputs.versions }} + + docker: + needs: list-wasabi-versions + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ${{ fromJson(needs.list-wasabi-versions.outputs.versions) }} + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: "{{ defaultContext }}:containers/wasabi-clients/${{ matrix.version }}" + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/wasabi-client:${{ matrix.version }} \ No newline at end of file