Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.3.0 to 3.6.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](98669ae865...548e2346a9)
---
updated-dependencies:
- dependency-name: docker/metadata-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
name: Build Container
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
is_new: ${{ steps.check_ver.outputs.is_new }}
|
|
version: ${{ steps.check_ver.outputs.version }}
|
|
steps:
|
|
- name: Check version
|
|
id: check_ver
|
|
run: |
|
|
get_ver() (curl -s "$@" | grep -Po "(\d+\.)+\d+\-r\d+" | head -1)
|
|
OLD_VER=$(get_ver ${GHCO_URL})
|
|
NEW_VER=$(get_ver ${ALPINE_PKG_URL})
|
|
if [ "$NEW_VER" != "$OLD_VER" ]; then
|
|
echo "::set-output name=is_new::true"
|
|
else
|
|
echo "::set-output name=is_new::false"
|
|
fi
|
|
echo "::set-output name=version::${NEW_VER}"
|
|
env:
|
|
ALPINE_PKG_URL: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/qbittorrent-nox
|
|
GHCO_URL: https://github.com/mogeko/docker-qbittorrent/pkgs/container/qbittorrent
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
if: ${{ needs.check.outputs.is_new }}
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@548e2346a9987b56d8a4104fe776321ff8e23440
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=edge
|
|
type=schedule,pattern={{date 'YYYYMMDD'}}
|
|
type=raw,${{ needs.check.outputs.version }}
|
|
|
|
- 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
|