Add node_modules binaries to env for docker image #24
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
name: Update docker image | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: neonlabsorg/pancake | |
jobs: | |
dockerize: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Define tag | |
id: define-env | |
run: | | |
if [[ "${{ github.ref_name }}" == 'main' ]]; then | |
tag='latest' | |
else | |
tag='${{ github.sha }}' | |
fi | |
echo "tag=${tag}" | |
echo "tag=${tag}" >> $GITHUB_OUTPUT | |
- name: Build image | |
run: | | |
docker build -t $IMAGE_NAME:${{ steps.define-env.outputs.tag }} . | |
- name: Push image | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p "${{ secrets.DOCKER_PASSWORD }}" | |
echo "Push image $IMAGE_NAME:${{ steps.define-env.outputs.tag }} to Docker registry" | |
docker push --all-tags $IMAGE_NAME |