Skip to content

Run on branch push

Run on branch push #1

on:
push:
branches:
- lma/release/wccd
tags:
- dapp-wccd/mainnet-*
- dapp-wccd/testnet-*
env:
SERVICE_NAME: 'dapp-wccd'
BASE_IMAGE: 'node:18-slim'
AWS_ROLE_TO_ASSUME: 'arn:aws:iam::192549843005:role/github_browser_wallet'
jobs:
release-docker:
runs-on: ubuntu-latest
environment: release
steps:
- name: Login to Docker Hub
if: ${{ secrets.DOCKERHUB_TOKEN }}

Check failure on line 20 in .github/workflows/release-dapp-wccd.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-dapp-wccd.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/release-dapp-wccd.yaml (Line: 20, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DOCKERHUB_TOKEN .github/workflows/release-dapp-wccd.yaml (Line: 52, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DOCKERHUB_TOKEN
uses: docker/login-action@v3
with:
username: 'concordium'
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
submodules: recursive
- name: Set image tag if correctly formatted
env:
TAG: ${{ github.ref_name }}
run: |
SERVICE_TAG=${TAG##${{ env.SERVICE_NAME }}/}
IFS='-' read -r ENVIRONMENT TAG_VERSION <<< "$SERVICE_TAG"
echo "FULL_IMAGE_TAG=concordium/${{ env.SERVICE_NAME }}:${ENVIRONMENT}-${TAG_VERSION}" >> $GITHUB_ENV
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
- name: Check if image exist
run: |
set +e
docker manifest inspect ${{ env.FULL_IMAGE_TAG }}
EXITCODE=$?
if [ $EXITCODE -eq "0" ]; then
echo "Error: ${{ env.FULL_IMAGE_TAG }} already exist"
exit 1
fi
- name: Build and push docker image
if: ${{ secrets.DOCKERHUB_TOKEN }}
uses: docker/build-push-action@v6
with:
context: ./examples/wCCD
file: ./examples/wCCD/Dockerfile
tags: ${{ env.FULL_IMAGE_TAG }}
no-cache: true
push: false
build-args: |
NETWORK=${{ env.ENVIRONMENT }}
base_image=${{ env.base_image }}