corrijo CI process #17
Workflow file for this run
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
# version 1.0 | |
name: Build and push | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
work: | |
name: Work | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v2 | |
- name: Lowercase | |
id: lower | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository }} | |
- name: Agregar envs | |
run: | | |
if [[ "${GITHUB_REF#refs/tags/}" == "latest" ]]; then | |
echo "${{ secrets.ENV_PRODUCTION }}" > .env.local | |
else | |
echo "${{ secrets.ENV_STAGING }}" > .env.local | |
fi | |
- name: Build & Push docker image | |
uses: mr-smithers-excellent/docker-build-push@v4 | |
with: | |
image: ${{ steps.lower.outputs.lowercase }} | |
registry: ghcr.io | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Notify Slack | |
uses: craftech-io/slack-action@v1 | |
with: | |
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }} | |
if: always() |