mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
Custom image build (#1)
* Create build_custom_image.yml * Update build_custom_image.yml
This commit is contained in:
parent
e4ecbb396a
commit
e38148ae8d
1 changed files with 70 additions and 0 deletions
70
.github/workflows/build_custom_image.yml
vendored
Normal file
70
.github/workflows/build_custom_image.yml
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
name: Build and Push Custom Frappe Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout frappe_docker repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: frappe/frappe_docker
|
||||
|
||||
- name: Create apps.json
|
||||
run: |
|
||||
cat <<EOF > apps.json
|
||||
[
|
||||
{
|
||||
"url": "https://github.com/frappe/erpnext",
|
||||
"branch": "version-15"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/frappe/hrms",
|
||||
"branch": "version-15"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/frappe/helpdesk",
|
||||
"branch": "develop"
|
||||
}
|
||||
{
|
||||
"url": "https://github.com/resilient-tech/india-compliance",
|
||||
"branch": "version-15"
|
||||
}
|
||||
]
|
||||
EOF
|
||||
|
||||
- name: Check apps.json syntax
|
||||
run: jq empty apps.json
|
||||
|
||||
- name: Generate APPS_JSON_BASE64
|
||||
run: |
|
||||
export APPS_JSON_BASE64=$(base64 -w 0 apps.json)
|
||||
echo "APPS_JSON_BASE64=$APPS_JSON_BASE64" >> $GITHUB_ENV
|
||||
|
||||
- name: Install podman
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y podman
|
||||
|
||||
- name: Build custom image
|
||||
run: |
|
||||
podman build \
|
||||
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
||||
--build-arg=FRAPPE_BRANCH=version-15 \
|
||||
--build-arg=APPS_JSON_BASE64=${{ env.APPS_JSON_BASE64 }} \
|
||||
--tag=ghcr.io/${{ github.repository }}/custom:15 \
|
||||
--file=images/layered/Containerfile .
|
||||
|
||||
- name: Podman login to ghcr.io
|
||||
run: |
|
||||
podman login ghcr.io -u ${{ github.actor }} -p ${{ secrets.USER_TOKEN }}
|
||||
|
||||
- name: Push image to ghcr.io
|
||||
run: |
|
||||
podman push ghcr.io/${{ github.repository }}/custom:15
|
||||
|
||||
- name: podman images list
|
||||
run: podman images
|
||||
Loading…
Reference in a new issue