NAStool Docker Beta #7
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: NAStool Docker Beta | |
on: | |
workflow_dispatch: | |
inputs: | |
docker_username: | |
description: 'docker user name' | |
required: true | |
default: '' | |
docker_password: | |
description: 'docker user password' | |
required: true | |
default: '' | |
jobs: | |
alpine: | |
runs-on: ubuntu-latest | |
name: Build Docker Beta Image (Alpine) | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Release version | |
id: release_version | |
run: | | |
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp") | |
echo "app_version=${app_version}-beta" >> $GITHUB_ENV | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ github.event.inputs.docker_username }}/nas-tools | |
tags: | | |
type=raw,value=${{ env.app_version }} | |
type=raw,value=beta | |
- | |
name: Set Up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set Up Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.event.inputs.docker_username }} | |
password: ${{ github.event.inputs.docker_password }} | |
- | |
name: Build Image | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/beta.Dockerfile | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
debian: | |
runs-on: ubuntu-latest | |
name: Build Docker Beta Image (Debian) | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Release version | |
id: release_version | |
run: | | |
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp") | |
echo "app_version=${app_version}-debian-beta" >> $GITHUB_ENV | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ github.event.inputs.docker_username }}/nas-tools | |
tags: | | |
type=raw,value=${{ env.app_version }} | |
type=raw,value=debian-beta | |
- | |
name: Set Up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set Up Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.event.inputs.docker_username }} | |
password: ${{ github.event.inputs.docker_password }} | |
- | |
name: Build Image | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/debian-beta.Dockerfile | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |