Skip to content

Commit

Permalink
ci: move docker-release to docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vnghia committed Jan 2, 2024
1 parent bd813fc commit 969051b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
push:
branches:
- main
tags:
- "*-?v[0-9]+*"
pull_request:
branches:
- main
Expand Down
42 changes: 1 addition & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,51 +113,11 @@ jobs:
run: |
gh release upload ${{ github.ref_name }} "tmp/script.ryot.zip"
docker-release:
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get docker image name and build args
id: required_args
run: |
image_name="${{ env.REGISTRY }}/${{ github.actor }}/${{ github.event.repository.name }}"
image_names="$image_name:${{ github.ref_name }},$image_name:unstable"
if [ "${{ needs.create-release.outputs.is-prerelease }}" = "false" ]; then
image_names="$image_names,$image_name:latest"
fi
# lowercase the name
image_names=$(echo "$image_names" | tr '[:upper:]' '[:lower:]')
echo "image_names=$image_names" >> $GITHUB_OUTPUT
- name: Build and push to ghcr
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.required_args.outputs.image_names }}

# Mark the Github Release™ as a non-draft now that everything has succeeded!
publish-release:
# Only run after all the other tasks, but it's ok if upload-artifacts was skipped
needs:
[create-release, upload-artifacts, docker-release, upload-kodi-plugin]
[create-release, upload-artifacts, upload-kodi-plugin]
if: ${{ always() && needs.create-release.result == 'success' && (needs.upload-artifacts.result == 'skipped' || needs.upload-artifacts.result == 'success') }}
runs-on: ubuntu-latest
env:
Expand Down

0 comments on commit 969051b

Please sign in to comment.