-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d619fb
commit e2b12e3
Showing
3 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: publish-image | ||
|
||
# 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: | ||
pull_request: | ||
branches: [ main, v2_devel, docker ] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# use DOCKERHUB_USERNAME as the name maybe different from the github username | ||
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | ||
TAG: latest | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- | ||
name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- | ||
name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf | ||
|
||
# Login against all registries | ||
# https://github.com/docker/login-action | ||
- | ||
name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Extract metadata (tags, labels) for Docker | ||
# https://github.com/docker/metadata-action | ||
- | ||
name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Build and push Docker image with Buildx | ||
# https://github.com/docker/build-push-action | ||
- | ||
name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- | ||
name: retag and push multiplatform images to multiple registries | ||
uses: akhilerm/tag-push-action@v2.0.0 | ||
with: | ||
src: docker.io/${{ env.IMAGE_NAME }}:${{ env.TAG }} | ||
# make sure the github name is correct | ||
dst: ${{ env.REGISTRY }}/${{ github.actor }}/${{ github.event.repository.name }}:${{ env.TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
########################################################### | ||
# setup default directories and configs | ||
FROM shitwolfymakes/arm-dependencies AS base | ||
RUN \ | ||
mkdir -m 0777 -p /home/arm /home/arm/config /mnt/dev/sr0 /mnt/dev/sr1 /mnt/dev/sr2 /mnt/dev/sr3 && \ | ||
ln -sv /home/arm/config/arm.yaml /opt/arm/arm.yaml && \ | ||
ln -sv /opt/arm/apprise.yaml /home/arm/config/apprise.yaml && \ | ||
echo "/dev/sr0 /mnt/dev/sr0 udf,iso9660 users,noauto,exec,utf8,ro 0 0" >> /etc/fstab && \ | ||
echo "/dev/sr1 /mnt/dev/sr1 udf,iso9660 users,noauto,exec,utf8,ro 0 0" >> /etc/fstab && \ | ||
echo "/dev/sr2 /mnt/dev/sr2 udf,iso9660 users,noauto,exec,utf8,ro 0 0" >> /etc/fstab && \ | ||
echo "/dev/sr3 /mnt/dev/sr3 udf,iso9660 users,noauto,exec,utf8,ro 0 0" >> /etc/fstab | ||
|
||
# copy ARM source last, helps with Docker build caching | ||
COPY . /opt/arm/ | ||
|
||
EXPOSE 8080 | ||
#VOLUME /home/arm | ||
VOLUME /home/arm/Music | ||
VOLUME /home/arm/logs | ||
VOLUME /home/arm/media | ||
VOLUME /home/arm/config | ||
WORKDIR /home/arm | ||
|
||
ENTRYPOINT ["/opt/arm/scripts/docker-entrypoint.sh"] | ||
CMD ["python3", "/opt/arm/arm/runui.py"] | ||
|
||
########################################################### | ||
# setup default directories and configs | ||
FROM base as automatic-ripping-machine | ||
|
||
# pass build args for labeling | ||
ARG image_revision=2.5.9 | ||
ARG image_created="2022-03-16" | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/1337-server/automatic-ripping-machine | ||
LABEL org.opencontainers.image.revision="2.5.9" | ||
LABEL org.opencontainers.image.created="2022-03-16" | ||
LABEL org.opencontainers.image.license=MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters