Browse Source

Update github action for building and publishing to dockerhub

pull/109/head
Per-Arne Andersen 4 years ago
parent
commit
09ede2b6af
  1. 42
      .github/workflows/image.yml

42
.github/workflows/image.yml

@ -1,25 +1,37 @@
name: build wg-dashboard name: build and publish
on: on:
push: push:
branches: branches:
- master - 'main'
jobs: jobs:
build: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout code -
name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: install buildx -
id: buildx name: Set up QEMU
uses: crazy-max/ghaction-docker-buildx@v1 uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with: with:
version: latest username: ${{ secrets.DOCKER_USERNAME }}
- name: login to docker hub password: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin -
- name: build the image name: Build and push
run: | uses: docker/build-push-action@v2
docker buildx build --push \ with:
--tag perara/wg-manager:latest \ context: .
--platform linux/amd64 . platforms: linux/amd64,linux/arm64
push: true
tags: user/app:latest

Loading…
Cancel
Save