Release 2.22.1 #425
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
on: | |
push: | |
branches: | |
- stable | |
tags: | |
- '**' | |
name: Build and push docker image | |
jobs: | |
build: | |
name: Build and push docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: ghcr.io/freefeed/freefeed-server | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=match,pattern=freefeed_release_(.*),group=1 | |
- uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy: | |
needs: build | |
name: Trigger deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy stable | |
if: github.ref == 'refs/heads/stable' | |
uses: satak/[email protected] | |
with: | |
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/server/stable?version=stable" | |
method: GET | |
- name: Get release version | |
if: startsWith(github.ref, 'refs/tags/freefeed_release') | |
id: version | |
shell: bash | |
run: echo "version=${GITHUB_REF#refs/tags/freefeed_release_}" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_REF: ${{ github.ref }} | |
- name: Deploy release | |
if: startsWith(github.ref, 'refs/tags/freefeed_release') | |
uses: satak/[email protected] | |
with: | |
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/server/release?version=${{ steps.version.outputs.version }}" | |
method: GET | |