diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml new file mode 100644 index 0000000..2953381 --- /dev/null +++ b/.github/workflows/docker_image.yml @@ -0,0 +1,41 @@ +name: Push docker images to the GitHub registry + +on: + push: + branches: master + tags: + - "v*.*.*" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + multi: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml deleted file mode 100644 index 25bedc6..0000000 --- a/.github/workflows/dockerhub.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Push docker images to Dockerhub - -on: - push: - branches: master - tags: - - "v*.*.*" - -jobs: - multi: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set output - id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - - name: Build and push latest OpenTOSCA UI - if: ${{ steps.vars.outputs.tag == 'master' }} - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: opentosca/ui:latest - - - name: Build and push version of OpenTOSCA UI - if: ${{ steps.vars.outputs.tag != 'master' }} - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: opentosca/ui:${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9310714..3562796 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,16 +14,16 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 17 # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies from package-lock.json - run: npm clean-install + run: npm clean-install --legacy-peer-deps - name: Run linters run: npm run lint