add next and edge tags

This commit is contained in:
Thomas Dupont 2022-02-04 10:01:32 +01:00 committed by Joachim Van Herwegen
parent d44f7117f3
commit 9527b730b0

View File

@ -139,15 +139,15 @@ jobs:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
parallel-finished: true parallel-finished: true
docker: docker-main-branch:
needs: needs:
- lint - lint
- test-unit - test-unit
- test-integration - test-integration
- test-integration-windows - test-integration-windows
- validate-components - validate-components
# Only run on tags starting with v prefix for now -- extra push need for triggering CI again # Only run on tag push events starting with v prefix for now OR main branch push events
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -158,7 +158,9 @@ jobs:
with: with:
images: | images: |
solidproject/community-server solidproject/community-server
# edge will always be executed (without latest tag), semver only on tag push events (with latest tag)
tags: | tags: |
type=edge
type=semver,pattern={{version}} type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}} type=semver,pattern={{major}}
@ -178,6 +180,47 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
docker-versions-branch:
needs:
- lint
- test-unit
- test-integration
- test-integration-windows
- validate-components
# Only run on push events on a versions/* branch (ASSUMPTION: THERE SHOULD ONLY BE ONE THERE!)
if: startsWith(github.ref, 'refs/heads/versions/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
solidproject/community-server
# Just one label: next (no latest here) for the last pushed commit on this branch
tags: |
type=raw,value=next
github-token: ${{ secrets.github_token }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docs: docs:
runs-on: ubuntu-latest runs-on: ubuntu-latest