diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..015d65598 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/Client" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 103d66e8b..652791349 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,6 +3,8 @@ name: Publish Docker image on: push: branches: [master, develop] + release: + types: [published, created, edited] jobs: publish: @@ -19,12 +21,15 @@ jobs: run: | REGISTRY="ghcr.io" IMAGE="${REGISTRY}/${{ steps.repository.outputs.lowercase }}" - TAGS="${IMAGE}:${{ github.sha }}" - if [[ $GITHUB_REF == refs/heads/master ]]; then - TAGS="${TAGS},${IMAGE}:latest" - fi - if [[ $GITHUB_REF == refs/heads/develop ]]; then - TAGS="${TAGS},${IMAGE}:develop" + TAGS="${IMAGE}:${{ github.sha }},${IMAGE}:latest" + REF=${GITHUB_REF,,} + PREFIX="$(dirname $REF)" + SUFFIX="$(basename $REF)" + if [[ $PREFIX = "refs/heads" ]]; then + TAGS="${TAGS},${IMAGE}:${SUFFIX}" + elif [[ $PREFIX = "refs/tags" ]]; then + RELEASE=${SUFFIX#"superalgos-"} + TAGS="${TAGS},${IMAGE}:${RELEASE}" fi echo ::set-output name=tags::${TAGS} - name: Login in to registry @@ -33,9 +38,17 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + - name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} - name: Push to registry uses: docker/build-push-action@v2 with: push: true file: ./Docker/Dockerfile tags: ${{ steps.prep.outputs.tags }} + platforms: linux/amd64,linux/arm64,linux/arm/v7