From 1583749e5050cc57d1f405f83ff81d8ea54550f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Ramiro=20D=C3=ADaz?= Date: Thu, 28 Mar 2024 12:26:32 -0300 Subject: [PATCH] improvement: merge workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Agustín Ramiro Díaz --- .github/workflows/code.yml | 27 ++++++++------ .../push-matchbox_server-dockerhub.yml | 36 ------------------- 2 files changed, 17 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/push-matchbox_server-dockerhub.yml diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 4c80dfc4..08c0d3c9 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -75,7 +75,6 @@ jobs: - name: Run cargo clippy run: cargo fmt --all --check - lint-native: name: Lints native strategy: @@ -117,14 +116,14 @@ jobs: - name: Run cargo clippy run: RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy > - --all-targets - --target wasm32-unknown-unknown - -p matchbox_socket - -p bevy_matchbox - -p bevy_ggrs_example - -p simple_example - -- - -D warnings + --all-targets + --target wasm32-unknown-unknown + -p matchbox_socket + -p bevy_matchbox + -p bevy_ggrs_example + -p simple_example + -- + -D warnings server-container: name: Build & Push Server Container @@ -147,11 +146,19 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Docker Metadata id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_REPOSITORY }} + images: | + ${{ env.IMAGE_REPOSITORY }} + ${{ vars.DOCKERHUB_USERNAME }}/matchbox_server tags: | type=ref,event=tag type=raw,value=latest diff --git a/.github/workflows/push-matchbox_server-dockerhub.yml b/.github/workflows/push-matchbox_server-dockerhub.yml deleted file mode 100644 index 8aa24325..00000000 --- a/.github/workflows/push-matchbox_server-dockerhub.yml +++ /dev/null @@ -1,36 +0,0 @@ -on: - push: - tags: - - "v*" - -name: Push `matchbox_server` to Docker Hub - -jobs: - build: - name: Login, Build and Push to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ vars.DOCKERHUB_USERNAME }}/matchbox_server - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - file: matchbox_server/Dockerfile - # Remove the 'v' from the tag - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }}