mirror of
https://github.com/flameshikari/outline-ru.git
synced 2026-06-13 04:05:10 +03:00
update workflows
This commit is contained in:
+15
-17
@@ -4,18 +4,14 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
- .github
|
||||
- .github/workflows/*
|
||||
- shared
|
||||
- src
|
||||
- Dockerfile
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
@@ -29,21 +25,23 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Export variable
|
||||
- name: Extract Version
|
||||
run: |
|
||||
echo "VERSION=$(cat src/package.json | jq -r '.version')" >> $GITHUB_ENV
|
||||
echo "VERSION=$(jq -r '.version' src/package.json)" | tee -a $GITHUB_ENV
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to the GitHub Container Registry
|
||||
- if: ${{ github.ref == 'refs/heads/master' }}
|
||||
name: Login to the GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
- if: ${{ github.ref == 'refs/heads/master' }}
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
@@ -54,8 +52,8 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ env.IMAGE_NAME }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
${{ github.repository }}
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ env.VERSION }}
|
||||
@@ -65,13 +63,13 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
push: ${{ github.ref == 'refs/heads/master' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags:
|
||||
${{ steps.meta.outputs.tags }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
- name: Create Release
|
||||
- if: ${{ github.ref == 'refs/heads/master' }}
|
||||
name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: ${{ env.VERSION }}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Dry Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- .github
|
||||
- shared
|
||||
- src
|
||||
- Dockerfile
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Dry Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: false
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in New Issue
Block a user