Skip to content

hotfix:make-env-for-prod-config #2

hotfix:make-env-for-prod-config

hotfix:make-env-for-prod-config #2

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: ci-flow
on:
push:
branches: ["dev"]
env:
REGISTRY: ghcr.io
USER_NAME: im-qarch
IMAGE_NAME: go-automatic-chainsaw
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GIT_PERSONAL_ACCESS_TOKEN }}
- name: Load secrets and save to app.env
run: ${{ github.APP_ENV }} | jq -r > app.env
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.USER_NAME }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.USER_NAME }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}