Skip to content

ci: change REGISTRY_USERNAME to a variable #5

ci: change REGISTRY_USERNAME to a variable

ci: change REGISTRY_USERNAME to a variable #5

Workflow file for this run

name: Publish Docker Image
on:
push:
tags:
- 'release-*'
- 'v*'
jobs:
build:
name: Build and Publish to Registry
runs-on: ubuntu-latest
steps:
# Checkout since we need .rsinclude and .gitignore
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker
uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ vars.REGISTRY }}/${{ vars.REGISTRY_PROJECT }}/${{ vars.IMAGE_NAME }}-${{ needs.find-environment.outputs.env_name }}
- name: Build and Publish image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.label }}