feat(): github action build-tag

pull/50/head
Magicalex 2020-03-05 18:07:15 +01:00
parent 915029953e
commit 491a4998a6
No known key found for this signature in database
GPG Key ID: A89B48B1788C3CB5
1 changed files with 40 additions and 0 deletions

40
.github/workflows/build-tag.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: build-tag
on:
push:
tags:
- stable-*
jobs:
build-latest-tag:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
-
name: Dockerhub login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-
name: Get tag name
id: tag_name
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
-
name: Run Buildx
env:
TAG: ${{ steps.tag_name.outputs.TAG }}
run: |
docker buildx build \
--pull \
--push \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--tag mondedie/flarum:"${TAG}" .