summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorunbelauscht <58393353+unbelauscht@users.noreply.github.com>2023-12-06 12:19:21 +0100
committerGitHub <noreply@github.com>2023-12-06 12:19:21 +0100
commit9e970fe4bdec406113928d0cbb4d395d070a27ed (patch)
treeffa3ce5909676c75424f77d5ec1e74d6fb1dd00d /.github/workflows
parentd76fed585003728ea759767d8e5e24fe918118f5 (diff)
downloadinvidious-9e970fe4bdec406113928d0cbb4d395d070a27ed.tar.gz
invidious-9e970fe4bdec406113928d0cbb4d395d070a27ed.tar.bz2
invidious-9e970fe4bdec406113928d0cbb4d395d070a27ed.zip
docker-meta generate versioned docker tags & OCI labels (#4161)
* Use docker-meta to generate tags and labels + versioning I updated the workflow to have additional tags based on git tags. This way an administrator can get images by Invidious version tag. * Use current date as image tag * Switch to YYYY.MM.DD-SHA_SHORT * Use short sha to follow existing tagging style * revert build-push-actions to v5 --------- Co-authored-by: panda <panda@purplehaze.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/container-release.yml37
1 files changed, 30 insertions, 7 deletions
diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml
index 8b3202d7..678c3513 100644
--- a/.github/workflows/container-release.yml
+++ b/.github/workflows/container-release.yml
@@ -11,7 +11,6 @@ on:
- invidious.service
- .git*
- .editorconfig
-
- screenshots/*
- .github/ISSUE_TEMPLATE/*
- kubernetes/**
@@ -52,28 +51,52 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: quay.io/invidious/invidious
+ tags: |
+ type=sha,format=short
+ type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ labels: |
+ quay.expires-after=12w
+
- name: Build and push Docker AMD64 image for Push Event
- if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
- labels: quay.expires-after=12w
+ labels: ${{ steps.meta.outputs.labels }}
push: true
- tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest
+ tags: ${{ steps.meta.outputs.tags }}
build-args: |
"release=1"
+ - name: Docker meta
+ id: meta-arm64
+ uses: docker/metadata-action@v5
+ with:
+ images: quay.io/invidious/invidious
+ flavor: |
+ suffix=-arm64
+ tags: |
+ type=sha,format=short
+ type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ labels: |
+ quay.expires-after=12w
+
- name: Build and push Docker ARM64 image for Push Event
- if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
- labels: quay.expires-after=12w
+ labels: ${{ steps.meta-arm64.outputs.labels }}
push: true
- tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64
+ tags: ${{ steps.meta-arm64.outputs.tags }}
build-args: |
"release=1"