-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.07 KB
/
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
name: Build Images
on:
push:
branches: # Push to the following branches with a PR will trigger the workflow
- master
- issue/**
defaults:
run:
shell: bash
env:
CLI_IMAGE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}-image
jobs:
push_image:
name: Build and Push Docker image
runs-on: ubuntu-latest
# Build a docker image and push to registry.
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Setup docker builder
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
- name: Log into GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
uses: docker/build-push-action@v2
with:
push: true
context: .
tags: |
${{ env.CLI_IMAGE }}:2-php74-issue