Push Latest/Nightly #1066
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: Push Latest/Nightly | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# run at 00:03 (which is about 4pm pacific) | |
- cron: '3 0 * * *' | |
jobs: | |
push_latest: | |
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@master | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: chrisjohnson00 | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
chrisjohnson00/qbittorrent-openvpn:latest | |
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64 | |
labels: | | |
org.opencontainers.image.documentation=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |
org.opencontainers.image.version=latest | |
org.opencontainers.image.source=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |
- name: Get Qbittorrent version from container | |
id: qbittorrent | |
run: | | |
output=$(docker run chrisjohnson00/qbittorrent-openvpn:latest 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 }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
chrisjohnson00/qbittorrent-openvpn:${{ steps.qbittorrent.outputs.version }} | |
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64 | |
labels: | | |
org.opencontainers.image.documentation=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |
org.opencontainers.image.version=${{ steps.qbittorrent.outputs.version }} | |
org.opencontainers.image.source=https://github.com/chrisjohnson00/docker-qBittorrentvpn | |