From 91728ead9a6b1cb5b4b04e3eaa93efa8b53291ee Mon Sep 17 00:00:00 2001 From: Max Harris <15605269+skibum1869@users.noreply.github.com> Date: Tue, 19 Nov 2024 20:36:23 -0600 Subject: [PATCH] update the github actions --- .github/workflows/dockerpublish.yml | 23 ++++++++--------------- .github/workflows/dockertest.yml | 23 ++++++++--------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dockerpublish.yml b/.github/workflows/dockerpublish.yml index bdbb333..65bc6b7 100644 --- a/.github/workflows/dockerpublish.yml +++ b/.github/workflows/dockerpublish.yml @@ -4,7 +4,7 @@ on: push: # Publish `main` as Docker `latest` image. # branches: - # - "main" + # - "main" # Publish `2.1.2.3` tags as releases. tags: @@ -22,28 +22,22 @@ jobs: docker: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v3 - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to DockerHub - uses: docker/login-action@v3 + - name: Login to DockerHub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: create version + - name: create version run: | echo "VERSION=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV echo "MAJOR_VERSION=$(echo ${{ github.ref_name }} | sed -E 's/^([0-9]+)\.([0-9]+)\..+/\1.\2/')" >> $GITHUB_ENV - - - name: Build and push + - name: Build and push uses: docker/build-push-action@v5 with: context: . @@ -56,7 +50,6 @@ jobs: # push to docker hub push: true - # steps: # - name: Build and push Docker images # uses: docker/build-push-action@v2.5.0 diff --git a/.github/workflows/dockertest.yml b/.github/workflows/dockertest.yml index 316fe8b..03de2e6 100644 --- a/.github/workflows/dockertest.yml +++ b/.github/workflows/dockertest.yml @@ -17,34 +17,28 @@ on: # workflow_dispatch: env: - app: ods + app: mtconnect jobs: docker: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v3 - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to DockerHub - uses: docker/login-action@v3 + - name: Login to DockerHub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: create version + - name: create version run: | echo "VERSION=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV echo "MAJOR_VERSION=$(echo ${{ github.ref_name }} | sed -E 's/^([0-9]+)\.([0-9]+)\..+/\1.\2/')" >> $GITHUB_ENV - - - name: Build and push + - name: Build and push uses: docker/build-push-action@v5 with: context: . @@ -55,7 +49,6 @@ jobs: # push to docker hub push: true - # steps: # - name: Build and push Docker images # uses: docker/build-push-action@v2.5.0