Skip to content

Updated twice a day #153

Updated twice a day

Updated twice a day #153

Workflow file for this run

name: Docker Image CI
on:
release:
types: [published, unpublished, created, edited, released, deleted]
paths:
- 'scripts/**'
- 'Dockerfile-for-github-action'
- 'requirements.txt'
- 'example.env'
- '.github/workflows/docker-image.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
-name: Check out from Git
-uses: actions/checkout@v1
-name: Check if Git tag exists
run: echo "::set-env name=HEAD_TAG::$(git tag --points-at HEAD)"

Check failure on line 24 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-image.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log into docker hub registry
if: env.HEAD_TAG != ''
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build and push Docker image
if: env.HEAD_TAG != ''
run: |
PLATFORMS=linux/arm64,linux/amd64
DOCKER_IMAGE=arcw/sgcc_electricity
docker buildx build --build-arg VERSION=${{ steps.get_version.outputs.VERSION }} --platform $PLATFORMS -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ steps.get_version.outputs.VERSION }} --file Dockerfile-for-github-action --push .
- name: Log into Aliyun hub registry and push Docker image
if: env.HEAD_TAG != ''
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.ALIYUN_USERNAME }} --password-stdin registry.cn-hangzhou.aliyuncs.com
PLATFORMS=linux/arm64,linux/amd64
DOCKER_IMAGE=registry.cn-hangzhou.aliyuncs.com/arcw/sgcc_electricity
docker buildx build --build-arg VERSION=${{ steps.get_version.outputs.VERSION }} --platform $PLATFORMS -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ steps.get_version.outputs.VERSION }} --file Dockerfile-for-github-action --push .