Skip to content

Merge pull request #1 from stackers-network/renovate/configure #3

Merge pull request #1 from stackers-network/renovate/configure

Merge pull request #1 from stackers-network/renovate/configure #3

Workflow file for this run

name: Build and Push Containers
on:
push:
branches:
- main
# paths:
# - '*/Dockerfile'
# - '*/VERSION'
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
container:
- stn-deploy-2024.1
- stn-deploy-master
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Read VERSION file
id: version
run: echo "version=$(cat ${{ matrix.container }}/VERSION)" >> $GITHUB_ENV
- name: Build and push Docker image with version
uses: docker/build-push-action@v2
with:
context: ${{ matrix.container }}
file: ${{ matrix.container }}/Dockerfile
push: true
tags: |
ghcr.io/stackers-network/${{ matrix.container }}:${{ env.version }}
ghcr.io/stackers-network/${{ matrix.container }}:latest