-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
# 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/[email protected] | ||
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 |