mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-23 09:53:52 +00:00
parent
58a204d36c
commit
b0a807b82c
78
.github/workflows/Docker-alpine.yml
vendored
Normal file
78
.github/workflows/Docker-alpine.yml
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
name: Docker_alpine
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ development ]
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: ghcr.io
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
# This is used to complete the identity challenge
|
||||
# with sigstore/fulcio when running outside of PRs.
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Pull Repo
|
||||
run: |
|
||||
git clone --branch $GITHUB_REF_NAME --depth 1 https://github.com/${GITHUB_REPOSITORY} repo
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Setup Docker buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# Login against a Docker registry except on PR
|
||||
# https://github.com/docker/login-action
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Extract metadata (tags, labels) for Docker
|
||||
# https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
flavor: |
|
||||
latest=false
|
||||
tags: |
|
||||
type=edge,suffix=-alpine,branch=development
|
||||
type=sha,suffix=-alpine
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ./repo
|
||||
file: ./repo/Dockerfile.alpine
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
@ -12,6 +12,7 @@ RUN apk add --no-cache git bash imagemagick libmagic curl tzdata neofetch libzba
|
||||
&& apk add --no-cache --update --virtual .build-deps gcc python3-dev musl-dev linux-headers \
|
||||
&& git config --global pull.ff only \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip cache purge \
|
||||
&& apk del .build-deps
|
||||
|
||||
ENTRYPOINT ["tini","--","bash","utils/docker-config.sh"]
|
Loading…
Reference in New Issue
Block a user