This repository has been archived by the owner on May 19, 2024. It is now read-only.
Remove unnecessary stuff (#160) #2
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
name: Publish ghcr | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '.github/**' | |
tags: | |
- v*.*.* | |
release: | |
types: [created] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: wanjohiryan/warp | |
BASE_TAG_PREFIX: relay | |
jobs: | |
build-base: | |
runs-on: ubuntu-latest | |
name: Publish moq-rs relay server | |
permissions: | |
contents: read | |
packages: write | |
# | |
# do not run on forks | |
# | |
if: github.repository_owner == 'wanjohiryan' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Container metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.BASE_TAG_PREFIX }} | |
#tag on release, and a nightly build for 'dev' | |
tags: | | |
type=raw,value=nightly,enable={{is_default_branch}} | |
type=ref,event=tag | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./moq-server | |
file: moq-server/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |