Use variables for image versions

This commit is contained in:
Jarno Rankinen 2023-11-07 06:13:21 +02:00
parent 101422700e
commit 3daeb77037
2 changed files with 32 additions and 1 deletions

30
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,30 @@
# This is a basic workflow to help you get started with Actions
name: Variable test
env:
NEXTCLOUD_UPSTREAM_VERSION: 27.1.3
IMAGE_MAJOR_VERSION: 27
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
variable_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test image build
uses: VaultVulp/gp-docker-action@1.6.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: nextcloud
extract-git-tag: false
additional-image-tags: ${{ env.IMAGE_MAJOR_VERSION }} ${{ env.NEXTCLOUD_UPSTREAM_VERSION }}
custom-args: --platform=linux/arm64,linux/amd64 --build-arg="NEXTCLOUD_UPSTREAM_VERSION=${{ env.NEXTCLOUD_UPSTREAM_VERSION }}"

View File

@ -1,4 +1,5 @@
FROM docker.io/library/nextcloud:27.1.3 ARG NEXTCLOUD_UPSTREAM_VERSION=27.1.3
FROM docker.io/library/nextcloud:${NEXTCLOUD_UPSTREAM_VERSION}
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \