beta image #302
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
name: beta image | |
on: | |
workflow_run: | |
workflows: ["tests"] | |
branches: [main] | |
types: | |
- completed | |
workflow_dispatch: | |
concurrency: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
push_to_Docker_Hub_amd64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: Bump patch version | |
run: | | |
# Get the current version | |
VERSION=$(grep -oP '^version = "\K[0-9]+\.[0-9]+\.[0-9]+' Cargo.toml) | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: remove dev deps and version (for cache purposes) | |
run: | | |
sh .github/workflows/remove_dev_deps_and_version.sh beta | |
shell: bash | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-amd64-beta | |
platforms: linux/amd64 | |
cache-from: type=gha,scope=main-amd64 | |
cache-to: type=gha,mode=max,scope=main-amd64 | |
build-args: | | |
BUILDKIT_INLINE_CACHE=1 | |
push_to_Docker_Hub_arm64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: Bump patch version | |
run: | | |
# Get the current version | |
VERSION=$(grep -oP '^version = "\K[0-9]+\.[0-9]+\.[0-9]+' Cargo.toml) | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: remove dev deps and version (for cache purposes) | |
run: | | |
sh .github/workflows/remove_dev_deps_and_version.sh beta | |
shell: bash | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-arm64-beta | |
platforms: linux/arm64 | |
cache-from: type=gha,scope=main-arm64 | |
cache-to: type=gha,mode=max,scope=main-arm64 | |
build-args: | | |
BUILDKIT_INLINE_CACHE=1 | |
push_to_Docker_Hub_arm_v7: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Swap Space | |
uses: pierotofy/set-swap-space@v1.0 | |
with: | |
swap-size-gb: 10 | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: get version | |
run: | | |
# Get the current version | |
VERSION=$(grep -oP '^version = "\K[0-9]+\.[0-9]+\.[0-9]+' Cargo.toml) | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: remove dev deps and version (for cache purposes) | |
run: | | |
sh .github/workflows/remove_dev_deps_and_version.sh beta | |
shell: bash | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-armv7-beta | |
platforms: linux/arm/v7 | |
cache-from: type=gha,scope=main-armv7 | |
cache-to: type=gha,mode=max,scope=main-armv7 | |
build-args: | | |
BUILDKIT_INLINE_CACHE=1 | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | |
merge_tags: | |
needs: [push_to_Docker_Hub_arm64, push_to_Docker_Hub_arm_v7, push_to_Docker_Hub_amd64] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: get version | |
run: | | |
# Get the current version | |
VERSION=$(grep -oP '^version = "\K[0-9]+\.[0-9]+\.[0-9]+' Cargo.toml) | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: merge into version | |
run: docker buildx imagetools create -t ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-armv7-beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-arm64-beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-amd64-beta | |
- name: merge into version | |
run: docker buildx imagetools create -t ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-armv7-beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-arm64-beta ${{ secrets.DOCKERHUB_USERNAME }}/vod2pod-rss:${{ env.VERSION }}-amd64-beta |