Skip to content

updated dependecies

updated dependecies #9

name: Publish multi-arch Docker images
on:
push:
branches:
- main
- dev
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set Release Tag
run: |
if [ "${GITHUB_REF#refs/*/}" = "main" ]; \
then echo "RELEASE_TAG=latest"; \
elif [ "${GITHUB_REF#refs/*/}" = "dev" ]; \
then echo "RELEASE_TAG=dev"; \
else echo "RELEASE_TAG=${GITHUB_REF#refs/*/}"; fi \
>> $GITHUB_ENV
-
name: Dockerhub login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
-
name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
-
name: Build dockerfile (with push)
run: |
docker buildx build \
--platform=linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=true" \
--file ./Dockerfile . \
--tag ${{ secrets.DOCKER_USERNAME }}/earnapp-metrics:${RELEASE_TAG}