align with other docker build pipelines #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
push: | ||
branches: | ||
- lma/release/wccd | ||
tags: | ||
- dapp-wccd/mainnet-* | ||
- dapp-wccd/testnet-* | ||
env: | ||
SERVICE_NAME: 'dapp-wccd' | ||
BASE_IMAGE: 'node:18-slim' | ||
jobs: | ||
release-docker: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
# Uses the `docker/login-action` action to log in to the Container registry. | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Extract version from git tag | ||
id: meta | ||
env: | ||
TAG: ${{ github.ref_name }} | ||
run: | | ||
SERVICE_TAG=${TAG##${{ env.SERVICE_NAME }}/} | ||
if [ $SERVICE_TAG != ${{ env.SOURCE_IMAGE_TAG }} ]; then | ||
echo "Tag version does not match the source image version." | ||
exit 1 | ||
fi | ||
echo "tag=${{ env.REGISTRY }}concordium/${{ env.SERVICE_NAME }}-${SERVICE_TAG}" >> $GITHUB_OUTPUT | ||
- name: Build and push docker image | ||
if: ${{ secrets.DOCKERHUB_TOKEN }} | ||
Check failure on line 42 in .github/workflows/release-dapp-wccd.yaml
|
||
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 }} |