Skip to content

build(dockerfile): change runtime stage image #35

build(dockerfile): change runtime stage image

build(dockerfile): change runtime stage image #35

Workflow file for this run

name: Create and publish a Docker image
on:
push:
branches: ['master']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
environment: production
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
environment: production
runs-on: ubuntu-latest
needs: build-and-push-image
env:
WEBHOOK_TOKEN: ${{secrets.WEBHOOK_TOKEN}}
WEBHOOK_ID: ${{secrets.WEBHOOK_ID}}
steps:
- name: Call webhook
run: |
curl -H "Authorization: Bearer ${{env.WEBHOOK_TOKEN}}" https://webhooks.modscleo4.dev.br/webhook/${{env.WEBHOOK_ID}}/call