Skip to content

Commit

Permalink
Add build_images_and_push(WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krout0n committed Jan 6, 2022
1 parent 6cdd9af commit ff88bfe
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
# TODO: remove this branch
- build-and-push-on-gha
tags:
- v*
pull_request:
Expand Down Expand Up @@ -121,3 +123,36 @@ jobs:
username: mkr-release
env:
SLACK_WEBHOOK_URL: ${{ secrets.MACKEREL_SLACK_WEBHOOK_URL }}

# This job is under construction now.
build_images_and_push:
# needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get tag
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF##*/}"
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: |
linux/amd64
linux/arm64
# push: true
# tags: |
# mackerel/mkr:latest
# mackerel/mkr:${{ steps.get_tag.outputs.tag }}
tags: |
mackerel/mkr:build-on-gha

0 comments on commit ff88bfe

Please sign in to comment.