Skip to content

Commit

Permalink
Merge pull request #30 from Mickhat/oli-remove-image-build-action
Browse files Browse the repository at this point in the history
Remove image build from github action, not needed for mickhat's serve…
  • Loading branch information
Mickhat committed Jul 1, 2023
2 parents fa91ada + e4d7162 commit 95f76eb
Showing 1 changed file with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions .github/workflows/build-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,36 @@ jobs:
- run: npm test
- run: npm run start

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# USE THIS FOR BUILD ON PUSH A GIT TAG
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v4
# - name: Log in to the Container registry
# uses: docker/login-action@v2
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# tags: |
# type=ref,event=tag
# type=semver,pattern={{version}}
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: package.json info
id: meta
uses: jaywcjlove/github-action-package@main
# - name: package.json info
# id: meta
# uses: jaywcjlove/github-action-package@main

- name: preparing variales to be lowercase
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
# - name: preparing variales to be lowercase
# run: |
# echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: "${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.BRANCH_NAME }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.meta.outputs.version }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.COMMIT_SHA }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:latest"
# tags: ${{ steps.meta.outputs.tags }} #TAG from metadata-action
# labels: ${{ steps.meta.outputs.labels }} #TAG from metadata-action
platforms: linux/amd64,linux/arm64
# - name: Build and push Docker image
# uses: docker/build-push-action@v3
# with:
# context: .
# push: true
# tags: "${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.BRANCH_NAME }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.meta.outputs.version }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.COMMIT_SHA }},${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:latest"
# # tags: ${{ steps.meta.outputs.tags }} #TAG from metadata-action
# # labels: ${{ steps.meta.outputs.labels }} #TAG from metadata-action
# platforms: linux/amd64,linux/arm64

- name: Trigger Re-Deploy Stage
env:
Expand Down

0 comments on commit 95f76eb

Please sign in to comment.