Skip to content

Updated dev env

Updated dev env #9

Workflow file for this run

name: env
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'env/*.Dockerfile'
- .github/workflows/env.yml
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
strategy:
matrix:
environment:
- dev
- roadie
- auto-minerva
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step will resolve username capitalization
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ matrix.environment }}-latest
${{ matrix.environment }}-${{ env.date }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: env/${{ matrix.environment }}.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false