-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.38 KB
/
build-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build Image
on:
push:
branches:
- main
- feat/github-actions-build-image
jobs:
duplicate_guard:
runs-on: self-hosted
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: "never"
skip_after_successful_duplicate: "true"
paths_ignore: '["**/README.md", "**/docs/**"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
docker-build:
needs: duplicate_guard
if: ${{ needs.duplicate_guard.outputs.should_skip != 'true' }}
runs-on: self-hosted
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
# Original code from https://blog.outsider.ne.kr/1531
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: techeer-f5
password: ${{ secrets.GH_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
id: docker_build
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/techeer-f5/jmt-monster-frontend:latest