dev #662
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: dev | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '*/Dockerfile' | |
- '.github/workflows/dev.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '*/Dockerfile' | |
- '.github/workflows/dev.yml' | |
schedule: | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
env: | |
VERSION_RE: main | |
VERSION_BARESIP: main | |
jobs: | |
libre-dev: | |
env: | |
IMAGE_NAME: ${{ github.repository }}/libre-dev | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log into registry | |
uses: docker/login-action@v3 | |
with: | |
registry: "ghcr.io" | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: | | |
docker build libre -t libre-dev \ | |
--build-arg VERSION=${{ env.VERSION_RE }} | |
- name: Tag and Push image | |
if: github.event_name != 'pull_request' | |
run: | | |
docker tag libre-dev ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RE }} | |
docker tag libre-dev ghcr.io/${{ env.IMAGE_NAME }}:latest | |
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RE }} | |
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest | |
baresip-dev: | |
env: | |
IMAGE_NAME: ${{ github.repository }}/baresip-dev | |
needs: [ "libre-dev" ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log into registry | |
uses: docker/login-action@v3 | |
with: | |
registry: "ghcr.io" | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: | | |
docker build baresip -t baresip-dev \ | |
--build-arg VERSION=${{ env.VERSION_BARESIP }} \ | |
--build-arg IMAGE=ghcr.io/baresip/docker/libre-dev:latest | |
- name: Tag and Push image | |
if: github.event_name != 'pull_request' | |
run: | | |
docker tag baresip-dev ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP }} | |
docker tag baresip-dev ghcr.io/${{ env.IMAGE_NAME }}:latest | |
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP }} | |
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest |