-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (54 loc) · 1.9 KB
/
ubuntu-cross.yml
File metadata and controls
61 lines (54 loc) · 1.9 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
name: Build ubuntu-cross Docker Image
on:
push:
branches:
- trunk
paths:
- '.github/workflows/ubuntu-cross.yml'
- 'tools/ubuntu-cross/**'
pull_request:
paths:
- '.github/workflows/ubuntu-cross.yml'
- 'tools/ubuntu-cross/**'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build ubuntu-cross
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Log in to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.base_ref == null }}
- name: Build and push image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
id: push
with:
context: .
file: ./tools/ubuntu-cross/Dockerfile
push: ${{ github.base_ref == null }}
tags: ghcr.io/automattic/vip-codespaces/ubuntu-cross:latest
cache-from: type=gha,scope=ubuntu-cross
cache-to: type=gha,mode=max,scope=ubuntu-cross
no-cache: ${{ github.event_name == 'workflow_dispatch' }}
- name: Attest provenance
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
with:
subject-name: ghcr.io/automattic/vip-codespaces/ubuntu-cross
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
if: ${{ github.base_ref == null }}