Skip to content

Merge pull request #4 from yeoleobun/fix-unused-variable #22

Merge pull request #4 from yeoleobun/fix-unused-variable

Merge pull request #4 from yeoleobun/fix-unused-variable #22

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
tag=$(date +%Y%m%d)
if [[ "${{ github.event.head_commit.message }}" =~ \[latest\] ]]; then
tag=latest
fi
docker build . --tag ghcr.io/restsend/rustpbx:$tag
docker push ghcr.io/restsend/rustpbx:$tag