-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (43 loc) · 1.4 KB
/
build_push_docker_image_Ubuntu.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
49
name: Pre-compile llvm ARM64
on:
workflow_dispatch:
inputs:
initialBuild:
description: "True if creating an initial Docker image for this branch"
required: true
type: boolean
push:
branches:
- 'release_*x'
paths-include:
- '**/.github/workflows/build_push_docker_image_Ubuntu.yml'
- '**/.github/workflows/UbuntuDockerfile.yml'
jobs:
docker:
runs-on: self-hosted
steps:
- name: Extract branch name
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: extract_branch
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
file: .github/workflows/UbuntuDockerfile
push: true
no-cache: true
context: .github/workflows
tags: ghcr.io/${{ github.repository_owner }}/ubuntu-flang-${{ steps.extract_branch.outputs.branch }}:latest
platforms: linux/arm64
build-args: |
BRANCH_NAME=${{ steps.extract_branch.outputs.branch }}
INITIAL_BUILD=${{ inputs.initialBuild }}