Merge pull request #36 from davbauer/dependabot/npm_and_yarn/dev/type… #154
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: dev docker build & push | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract Git info | |
run: | | |
echo "GIT_COMMITID=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
echo "GIT_BRANCH=$(git symbolic-ref --short HEAD)" >> $GITHUB_ENV | |
- name: Login to Docker registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.zec.one | |
username: ${{ secrets.REGISTRY_ZEC_ONE_USERNAME }} | |
password: ${{ secrets.REGISTRY_ZEC_ONE_PASSWORD }} | |
- name: Set up Docker Buildx | |
run: | | |
docker buildx version | |
docker buildx create --use | |
- name: Dockerize and Push Image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
platforms: linux/arm64,linux/amd64 | |
tags: registry.zec.one/charge-controller-dev | |
build-args: | | |
GIT_COMMITID=${{ env.GIT_COMMITID }} | |
GIT_BRANCH=${{ env.GIT_BRANCH }} |