mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-01-18 06:34:41 +01:00
Move deb packing under deb folder (#12)
This commit is contained in:
53
.github/workflows/deb.yaml
vendored
Normal file
53
.github/workflows/deb.yaml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
- .github/workflows/deb.yaml
|
||||
- deb/*
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/deb.yaml
|
||||
- deb/*
|
||||
|
||||
env:
|
||||
DOCKER_REPO: shenxn/protonmail-bridge
|
||||
DOCKER_REPO_DEV: shenxn/protonmail-bridge-dev
|
||||
|
||||
jobs:
|
||||
deb:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set version
|
||||
id: version
|
||||
run: echo "::set-output name=version::`cat deb/VERSION`"
|
||||
- name: Set repo
|
||||
id: repo
|
||||
run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ${{ steps.repo.outputs.repo }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./deb
|
||||
file: ./deb/Dockerfile
|
||||
tags: |
|
||||
${{ steps.repo.outputs.repo }}:latest
|
||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
Reference in New Issue
Block a user