Skip to content

Commit

Permalink
Merge pull request #282 from madeofpendletonwool/fix-cicd
Browse files Browse the repository at this point in the history
Upgraded chrono-tz and pulldown-cmark
  • Loading branch information
madeofpendletonwool authored Sep 21, 2024
2 parents 2b996fa + 8b34ecb commit 9f13c79
Show file tree
Hide file tree
Showing 5 changed files with 417 additions and 315 deletions.
122 changes: 84 additions & 38 deletions .github/workflows/build-tauri-clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
os:
- ubuntu-latest
- macOS-latest
- macOS-13
- windows-latest
runs-on: ${{ matrix.os }}

# Set an environment variable based on the OS
env:
DEPENDS_SETUP: ${{ matrix.os == 'ubuntu-latest' && 'true' || 'false' }}

Expand All @@ -37,26 +37,30 @@ jobs:
- name: Set environment variables
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
echo "ARTIFACT_NAME1=deb/pinepods_${{ env.IMAGE_TAG }}_amd64.deb" >> $GITHUB_ENV
echo "ARTIFACT_NAME2=appimage/pinepods_${{ env.IMAGE_TAG }}_amd64.AppImage" >> $GITHUB_ENV
echo "ARTIFACT_NAME3=rpm/pinepods-${{ env.IMAGE_TAG }}.x86_64.rpm"
echo "ARTIFACT_NAME1=pinepods_${{ env.IMAGE_TAG }}_amd64.deb" >> $GITHUB_ENV
echo "ARTIFACT_NAME2=pinepods_${{ env.IMAGE_TAG }}_amd64.AppImage" >> $GITHUB_ENV
echo "ARTIFACT_NAME3=pinepods-${{ env.IMAGE_TAG }}-1.x86_64.rpm" >> $GITHUB_ENV
elif [ "${{ matrix.os }}" = "windows-latest" ]; then
echo "ARTIFACT_NAME1=nsis/Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME2=msi/Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
elif [ "${{ matrix.os }}" = "macOS-latest" ]; then
echo "ARTIFACT_NAME1=dmg/Pinepods_${{ env.IMAGE_TAG }}_aarch64.dmg" >> $GITHUB_ENV
echo "ARTIFACT_NAME2=macos/Pinepods.app" >> $GITHUB_ENV
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_aarch64.dmg" >> $GITHUB_ENV
echo "ARTIFACT_NAME2=Pinepods.app" >> $GITHUB_ENV
elif [ "${{ matrix.os }}" = "macOS-13" ]; then
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64.dmg" >> $GITHUB_ENV
echo "ARTIFACT_NAME2=Pinepods.app" >> $GITHUB_ENV
fi
shell: bash
if: ${{ matrix.os != 'windows-latest' }}

- name: Set environment variables (Windows)
run: |
echo "ARTIFACT_NAME1=nsis/Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME2=msi/Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
shell: pwsh
if: ${{ matrix.os == 'windows-latest' }}


- name: Setup | Checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -146,69 +150,111 @@ jobs:
shell: pwsh
if: ${{ matrix.os == 'windows-latest' }}

- name: list bundles
run: |
ls -la web/src-tauri/target/release/bundle
shell: bash
- name: Archive build 1 (Ubuntu)
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: ./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: list mac bundles
run: |
ls -la web/src-tauri/target/release/bundle/macos
ls -la web/src-tauri/target/release/bundle/dmg
shell: bash
if: ${{ matrix.os == 'macOS-latest' }}
- name: Archive build 2 (Ubuntu)
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: ./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Archive build 1
- name: Archive build 3 (Ubuntu)
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME1 }}
path: ./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Archive build 2
- name: Archive build (macOS)
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME2 }}
path: |
./web/src-tauri/target/release/bundle/dmg/${{ env.ARTIFACT_NAME1 }}
./web/src-tauri/target/release/bundle/macos/${{ env.ARTIFACT_NAME2 }}
if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'macOS-13' }}

- name: Archive build 3
- name: Archive build (Windows)
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-build
path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME3 }}
if: ${{ matrix.os == 'ubuntu-latest' }}
path: |
./web/src-tauri/target/release/bundle/nsis/${{ env.ARTIFACT_NAME1 }}
./web/src-tauri/target/release/bundle/msi/${{ env.ARTIFACT_NAME2 }}
if: ${{ matrix.os == 'windows-latest' }}


- name: Upload release assets
if: github.event_name == 'release'
- name: Upload release asset (Ubuntu - DEB)
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME1 }}
asset_path: ./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
asset_name: ${{ env.ARTIFACT_NAME1 }}
asset_content_type: application/octet-stream
asset_content_type: application/vnd.debian.binary-package

- name: Upload release assets 2
if: github.event_name == 'release'
- name: Upload release asset (Ubuntu - AppImage)
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME2 }}
asset_path: ./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
asset_name: ${{ env.ARTIFACT_NAME2 }}
asset_content_type: application/octet-stream
asset_content_type: application/x-executable

- name: Upload release assets 3
- name: Upload release asset (Ubuntu - RPM)
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/${{ env.ARTIFACT_NAME3 }}
asset_path: ./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
asset_name: ${{ env.ARTIFACT_NAME3 }}
asset_content_type: application/octet-stream
asset_content_type: application/x-rpm

- name: Upload release asset (macOS - DMG)
if: github.event_name == 'release' && (matrix.os == 'macOS-latest' || matrix.os == 'macOS-13')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/dmg/${{ env.ARTIFACT_NAME1 }}
asset_name: ${{ env.ARTIFACT_NAME1 }}
asset_content_type: application/x-apple-diskimage

- name: Upload release asset (Windows - EXE)
if: github.event_name == 'release' && matrix.os == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/nsis/${{ env.ARTIFACT_NAME1 }}
asset_name: ${{ env.ARTIFACT_NAME1 }}
asset_content_type: application/vnd.microsoft.portable-executable

- name: Upload release asset (Windows - MSI)
if: github.event_name == 'release' && matrix.os == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/src-tauri/target/release/bundle/msi/${{ env.ARTIFACT_NAME2 }}
asset_name: ${{ env.ARTIFACT_NAME2 }}
asset_content_type: application/x-msi

# release:
# needs: compile
Expand Down
98 changes: 36 additions & 62 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Pinepods Image to DockerHub
name: Publish Pinepods Multi-Architecture Image to DockerHub

on:
release:
Expand All @@ -14,98 +14,72 @@ env:
IMAGE_NAME: madeofpendletonwool/pinepods

jobs:
build-x86:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_KEY }}

- name: Set Image Tag
id: set_tag
run: |
echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
- name: Build and push x86 image
run: |
docker build --build-arg PINEPODS_VERSION=${{ env.IMAGE_TAG }} -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-x86 -f dockerfile .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-x86
if [ "${{ env.IMAGE_TAG }}" == "latest" ]; then
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-x86 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-x86
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-x86
fi
platforms: linux/amd64,linux/arm64,linux/arm/v7

build-arm:
runs-on: pi4
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_KEY }}

- name: Set Image Tag
id: set_tag
- name: Set Image Tag and Latest Tag
id: set_tags
run: |
echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
if [ "${{ github.event_name }}" == "release" ]; then
echo "CREATE_LATEST=true" >> $GITHUB_ENV
else
echo "CREATE_LATEST=false" >> $GITHUB_ENV
fi
- name: Build and push ARM image
- name: Build and push x86 image
run: |
docker build --build-arg PINEPODS_VERSION=$(echo $IMAGE_TAG) -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm -f dockerfile-arm .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm
if [ "${{ env.IMAGE_TAG }}" == "latest" ]; then
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm
docker build --platform linux/amd64 --build-arg PINEPODS_VERSION=${{ env.IMAGE_TAG }} -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-amd64 -f dockerfile .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-amd64
if [ "${{ env.CREATE_LATEST }}" == "true" ]; then
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64
fi
create-and-push-manifest:
needs: [build-x86, build-arm]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_KEY }}

- name: Set Image Tag
id: set_tag
- name: Build and push ARMv8 image
run: |
echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
docker build --platform linux/arm64 --build-arg PINEPODS_VERSION=${{ env.IMAGE_TAG }} -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm64 -f dockerfile-arm .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm64
if [ "${{ env.CREATE_LATEST }}" == "true" ]; then
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
fi
- name: Create and push Docker manifest for the version tag
run: |
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-x86 \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-amd64 \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm64
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- name: Create and push Docker manifest for the latest tag
if: env.CREATE_LATEST == 'true'
run: |
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-x86 \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-arm
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64 \
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion completed_todos.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pinepods-1 | warnings.warn("tzname {tzname} identified but not understood. "
- [] Add additional safety parsing to ensure podcasts will display on pod feed page
- [] People don't clear out of hosts and people dropdowns if a podcast doesn't have people. So it shows the old podcast currently
- [] Implement additional filtering in podcasts
- [] Adjust people page so that you can drop down or minimize the episodes/podcasts
- [] Implement episode filtering on episode layout page
- [] Implement episode filtering on history page
- [] Implement episode filtering on saved page
Expand All @@ -38,7 +39,6 @@ Version 0.6.6

- [x] Manually adjust tags for podcast in podcast settings
- [x] Dynamically refresh tags on ep-layout when adding and removing them
- [] Fixed documentation so backend variables work with new docker standards
- [x] Removed see more button from the episodes_layout, queue, and downloads page
- [x] Added a People page so that you can see other episodes and podcasts a particular person has been on
- [x] Speed up people page loading (happens in async now)
Expand Down
Loading

0 comments on commit 9f13c79

Please sign in to comment.