Skip to content

Commit

Permalink
fix(ci): manual docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
awakot committed Jul 6, 2023
1 parent 591800f commit bf02730
Showing 1 changed file with 4 additions and 35 deletions.
39 changes: 4 additions & 35 deletions .github/workflows/ci_docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,14 @@ on:
sha_short:
description: 'sha_short'
required: true
new_tag:
description: 'new_tag'
required: true
new_tag_short:
description: 'new_tag_short'
required: true
name:
description: 'name'
required: true
sha:
description: "sha"
required: true
jobs:
build-docker-image:
name: Build and push Docker image
runs-on: ubuntu-latest
if: github.event.inputs.name || github.event.inputs.new_tag
if: github.event.inputs.name
env:
IMAGE_NAME: reearth/reearth
defaults:
Expand All @@ -42,37 +33,15 @@ jobs:
- name: Get options
id: options
env:
TAG: ${{ github.event.inputs.new_tag_short }}
NAME: ${{ github.event.inputs.name }}
SHA: ${{ github.event.inputs.sha_short }}
run: |
if [[ -n $TAG ]]; then
PLATFORMS=linux/amd64,linux/arm64
VERSION=$TAG
TAGS=$IMAGE_NAME:$TAG
if [[ ! $TAG =~ '-' ]]; then
TAGS+=,${IMAGE_NAME}:${TAG%.*}
TAGS+=,${IMAGE_NAME}:${TAG%%.*}
TAGS+=,${IMAGE_NAME}:latest
fi
else
PLATFORMS=linux/amd64
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
PLATFORMS=linux/amd64
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
- name: Fetch reearth-web release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: reearth/reearth
version: tags/${{ github.event.inputs.name || needs.info.outputs.tag }}
file: reearth-web_${{ github.event.inputs.name || needs.info.outputs.tag }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
target: server/reearth-web.tar.gz
- name: Extract reearth/web
run: tar -xvf reearth-web.tar.gz; mv reearth-web web; ls
- name: Build and push docker image
uses: docker/build-push-action@v2
with:
Expand Down

0 comments on commit bf02730

Please sign in to comment.