forked from XCSoar/XCSoar
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (39 loc) · 1.19 KB
/
build-container.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
---
on:
workflow_dispatch:
push:
paths:
- 'ide/docker/**'
- 'ide/provisioning/**'
- '.github/workflows/build-container.yml'
jobs:
xcsoar-docker-env:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGENAME: xcsoar-build
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Login to Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- id: lc_repository_name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
context: ./ide
file: ./ide/docker/Dockerfile
tags: ghcr.io/${{ steps.lc_repository_name.outputs.lowercase }}/xcsoar-build:latest
cache-from: type=registry,ref=ghcr.io/${{ steps.string.outputs.lowercase }}/xcsoar-build:latest
cache-to: type=inline
secrets: |
GIT_AUTH_TOKEN=${{ github.token }}