docker-qbittorrent/.github/workflows/build.yml
dependabot[bot] 80a30d13c8
build(deps): bump actions/checkout from 2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 20:26:32 +00:00

61 lines
1.7 KiB
YAML

name: Build Container
on:
push:
branches-ignore:
- master
pull_request:
branches:
- master
jobs:
check:
runs-on: ubuntu-latest
outputs:
new_ver: ${{ steps.check_ver.outputs.new_ver }}
latest: ${{ steps.check_ver.outputs.latest }}
steps:
- name: Check version
id: check_ver
run: |
NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "(\d+\.)+\d+(|beta\d+|rc\d+)\.zip" | head -1)
if echo "${NEW_TAG%.zip}" | grep -Pq "^(\d+\.){2}\d+$"; then
echo "::set-output name=latest::type=raw,latest"
fi
echo "::set-output name=new_ver::${NEW_TAG%.zip}-r0"
env:
REPO_TAGS: https://github.com/qbittorrent/qBittorrent/tags
meta:
runs-on: ubuntu-latest
needs: check
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681
with:
images: |
${{ github.repository_owner }}/qbittorrent
ghcr.io/${{ github.repository_owner }}/qbittorrent
tags: |
type=edge
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,${{ needs.check.outputs.new_ver }}
${{ needs.check.outputs.latest }}
- name: Save status
run: echo ${{ toJSON(steps.meta.outputs.json) }} > ${{ github.workspace }}/status.json
- name: Update status
uses: actions/upload-artifact@v2
with:
name: status
path: ${{ github.workspace }}/status.json