Update index.js #86
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: Docker Image CI | |
on: | |
push: | |
branches: [ "dev" ] | |
pull_request: | |
branches: [ "dev" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: cartographer-app | |
# run: docker build . -t cartographer-app | |
- run: docker-compose up -d --build | |
# Login against DockerHub registry | |
# - name: Log in to DockerHub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: vifebot | |
# password: ${{ secrets.VIFEBOT_DOCKERHUB_TOKEN }} | |
- name: Log in to GitHub Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/edirom/cartographer-app | |
flavor: | | |
latest=${{ github.ref == 'refs/heads/main' }} | |
# and push Docker image with Buildx (don't push on PR) | |
# https://github.com/docker/build-push-action | |
- name: build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
BUILDTYPE=github | |
- name: deploy | |
run: | | |
curl -X POST https://keel3.edirom.de/v1/webhooks/native -H 'Content-Type: application/json' -d '{"name": "ghcr.io/edirom/cartographer-app", "tag": "dev"}' | |