Merge pull request #1634 from FreeFeed/rename-cookie-banner #639
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 | |
- beta | |
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-react-client | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=match,pattern=freefeed_release_(.*),group=1 | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy: | |
needs: build | |
name: Trigger deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get release version | |
if: startsWith(github.ref, 'refs/tags/') | |
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/') | |
uses: satak/webrequest-action@v1.2.4 | |
with: | |
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/release?version=${{ steps.version.outputs.version }}" | |
method: GET | |
- name: Deploy stable | |
if: github.ref == 'refs/heads/stable' | |
uses: satak/webrequest-action@v1.2.4 | |
with: | |
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/stable?version=stable" | |
method: GET | |
- name: Deploy beta | |
if: github.ref == 'refs/heads/beta' | |
uses: satak/webrequest-action@v1.2.4 | |
with: | |
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/beta?version=beta" | |
method: GET | |