wg-easy/.github/workflows/deploy.yml

42 lines
1.0 KiB
YAML
Raw Normal View History

2021-05-23 18:38:39 +08:00
name: Build & Publish Docker Image to Docker Hub
on:
workflow_dispatch:
push:
branches:
- production
- production/**
jobs:
deploy:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-07-14 03:54:14 +08:00
with:
2021-07-14 03:55:12 +08:00
ref: production
2021-05-23 18:38:39 +08:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
2023-12-18 05:19:52 +08:00
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
2021-05-23 18:38:39 +08:00
with:
2023-12-18 05:19:52 +08:00
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2021-05-23 18:38:39 +08:00
# Set environment variables
2021-07-14 03:39:45 +08:00
- run: echo RELEASE=$(cat ./src/package.json | jq -r .release) >> $GITHUB_ENV
2021-05-23 18:38:39 +08:00
# Build & Publish
- name: Build & Publish Docker Image
uses: docker/build-push-action@v2
with:
push: true
2021-05-23 20:32:10 +08:00
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
2021-07-14 03:39:45 +08:00
tags: weejewel/wg-easy:latest, weejewel/wg-easy:${{ env.RELEASE }}