Skip to content

fix(deps): update npm-non-major #310

fix(deps): update npm-non-major

fix(deps): update npm-non-major #310

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 43, Col: 19): Unrecognized named-value: 'DOCKERHUB_USERNAME'. Located at position 1 within expression: DOCKERHUB_USERNAME
env:
IMAGENAME: tabsplid
STACKNAME: tabsplid
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.meta.outputs.version }}
strategy:
matrix:
component: [backend, frontend]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to private Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ DOCKERHUB_USERNAME }}//${{ env.IMAGENAME }}/${{ matrix.component }}
${{ secrets.REGISTRY_URL }}/${{ env.IMAGENAME }}/${{ matrix.component }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and push ${{ matrix.component }}
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
file: ./Dockerfile.${{ matrix.component }}
build-args: |
APP_VERSION=${{ steps.meta.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
publish:
needs: release
runs-on: ubuntu-latest
steps:
- name: Deploy stack
uses: robin-moser/portainer-stack-deploy@v2
with:
portainer-host: ${{ secrets.PORTAINER_HOST }}
token: ${{ secrets.PORTAINER_TOKEN }}
swarm-id: ${{ secrets.PORTAINER_SWARM_ID }}
stack-name: ${{ env.STACKNAME }}
tag-replacements: |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGENAME }}/backend:${{ needs.release.outputs.version }}
${{ secrets.REGISTRY_URL }}/${{ env.IMAGENAME }}/frontend:${{ needs.release.outputs.version }}