mirror of
https://ghproxy.net/https://github.com/fairpm/server.git
synced 2025-09-06 00:53:22 +08:00
Build container automatically (#18)
Signed-off-by: Ryan McCue <me@ryanmccue.info>
This commit is contained in:
parent
d9fb2e9863
commit
ac27aef40b
2 changed files with 30 additions and 25 deletions
30
.github/workflows/build.yml
vendored
Normal file
30
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Build and push container
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
run: bin/build.sh
|
25
.github/workflows/deploy.yml
vendored
25
.github/workflows/deploy.yml
vendored
|
@ -1,25 +0,0 @@
|
|||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Composer dependencies
|
||||
uses: php-actions/composer@v6
|
||||
|
||||
- name: Run deploy script
|
||||
run: bin/deploy.sh --apply
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DEPLOY_HOST: ${{ secrets.PRODUCTION_DEPLOY_HOST }}
|
||||
DEPLOY_USER: ${{ secrets.PRODUCTION_DEPLOY_USER }}
|
||||
DEPLOY_PASS: ${{ secrets.PRODUCTION_DEPLOY_PASS }}
|
Loading…
Add table
Add a link
Reference in a new issue