diff --git a/.github/workflows/docker-publish-arm64.yml b/.github/workflows/docker-publish-arm64.yml index afb14a7..1acc3cf 100644 --- a/.github/workflows/docker-publish-arm64.yml +++ b/.github/workflows/docker-publish-arm64.yml @@ -1,59 +1,59 @@ -# name: build image arm64 - -# on: -# push: -# branches: -# - "*" -# tags: -# - v* -# pull_request: - -# env: -# IMAGE_NAME: ensemble-manager -# #variables related with the repository -# REPOSITORY_MAIN_BRANCH: "master" -# #variables related with the docker imager registry -# DOCKER_IMAGE_REPOSITORY: mintproject -# DOCKER_IMAGE_NAME: ensemble-manager -# DOCKER_FILE: "Dockerfile" - -# jobs: -# build: -# runs-on: ubuntu-latest -# if: github.event_name == 'push' -# steps: -# - name: Get branch name -# id: branch-name -# uses: tj-actions/branch-names@v6 - -# - uses: actions/checkout@v2 - -# - name: Create environment variable with the commit id -# run: | -# echo "DOCKER_TAG=${GITHUB_SHA}" >> $GITHUB_ENV - -# - name: Expose the commit id -# id: exposeValue -# run: | -# echo "::set-output name=docker_tag::${{ env.DOCKER_TAG }}" - -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v2 - -# - name: Set up Docker Buildx -# uses: docker/setup-buildx-action@v2 - -# - name: Login to DockerHub -# uses: docker/login-action@v1 -# with: -# username: ${{ secrets.DOCKERHUB_USERNAME }} -# password: ${{ secrets.DOCKERHUB_TOKEN }} - -# - name: Build and push Docker image -# uses: docker/build-push-action@v3.0.0 -# with: -# push: true -# context: . -# tags: ${{ env.DOCKER_IMAGE_REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ steps.branch-name.outputs.current_branch }}, ${{ env.DOCKER_IMAGE_REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_TAG }} -# file: ${{ env.DOCKER_FILE}} -# platforms: linux/arm64 +name: build image arm64 + +on: + push: + branches: + - "*" + tags: + - v* + pull_request: + +env: + IMAGE_NAME: ensemble-manager + #variables related with the repository + REPOSITORY_MAIN_BRANCH: "master" + #variables related with the docker imager registry + DOCKER_IMAGE_REPOSITORY: mintproject + DOCKER_IMAGE_NAME: ensemble-manager + DOCKER_FILE: "Dockerfile" + +jobs: + build: + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v6 + + - uses: actions/checkout@v2 + + - name: Create environment variable with the commit id + run: | + echo "DOCKER_TAG=${GITHUB_SHA}" >> $GITHUB_ENV + + - name: Expose the commit id + id: exposeValue + run: | + echo "::set-output name=docker_tag::${{ env.DOCKER_TAG }}" + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3.0.0 + with: + push: true + context: . + tags: ${{ env.DOCKER_IMAGE_REPOSITORY }}-arm64/${{ env.DOCKER_IMAGE_NAME }}:${{ steps.branch-name.outputs.current_branch }}, ${{ env.DOCKER_IMAGE_REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_TAG }} + file: ${{ env.DOCKER_FILE}} + platforms: linux/arm64