chore: bump actions/cache from 4.0.2 to 4.1.0 #202
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ '**' ] | |
jobs: | |
container_build: | |
name: Build and Push Docker Container | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@master | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: chrisjohnson00 | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Determine container tag | |
run: | | |
if [[ $GITHUB_REF == refs/heads/* ]]; then | |
VERSION=${GITHUB_REF#refs/heads/} | |
if [[ $VERSION == main ]]; then | |
VERSION=latest | |
fi | |
fi | |
echo ::set-output name=container_tag::${VERSION} | |
id: prep | |
- name: Cache Docker layers | |
uses: actions/[email protected] | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-${{ steps.prep.outputs.container_tag }}- | |
${{ runner.os }}-buildx- | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
chrisjohnson00/qbittorrent-openvpn:${{ steps.prep.outputs.container_tag }} | |
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64 | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
labels: | | |
org.opencontainers.image.documentation=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |
org.opencontainers.image.version=${{ steps.prep.outputs.container_tag }} | |
org.opencontainers.image.source=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |
org.opencontainers.image.revision=${{ github.sha }} | |
- name: Get Qbittorrent version from container | |
id: qbittorrent | |
run: | | |
output=$(docker run chrisjohnson00/qbittorrent-openvpn:${{ steps.prep.outputs.container_tag }} qbittorrent-nox -v | grep -Eo "v(.*)") | |
echo "::set-output name=version::$(echo $output)" | |
- name: Display QBittorrent Version | |
run: | | |
echo $VERSION | |
env: | |
VERSION: ${{ steps.qbittorrent.outputs.version }} | |
actionslint: | |
name: Actions Yaml Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Actions Yaml Lint | |
uses: karancode/[email protected] | |
with: | |
yamllint_file_or_dir: .github/workflows | |
yamllint_comment: true | |
yamllint_config_filepath: .yamllint | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |