Skip to content

Commit

Permalink
Merge pull request #291 from SelfhostedPro/nightly
Browse files Browse the repository at this point in the history
Nightly
  • Loading branch information
SelfhostedPro authored Feb 19, 2021
2 parents 9288456 + c972244 commit 75aa40b
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: dockerhub-mirror

on:
workflow_dispatch:
inputs:
release:
description: 'Tag/Release to deploy'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DD--HH

- name: Checkout code
uses: actions/checkout@v2
ref: ${{ github.event.inputs.release }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm
push: true
build-args: |
VUE_APP_VERSION=${{ github.event.inputs.release }}
tags: |
selfhostedpro/yacht:${{ github.event.inputs.release }}
ghcr.io/selfhostedpro/yacht:${{ github.event.inputs.release }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

0 comments on commit 75aa40b

Please sign in to comment.