Skip to content

Commit 3aac91a

Browse files
committed
Test docker image builder
1 parent 575f158 commit 3aac91a

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

.github/workflows/ucm-docker-image.yaml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,47 @@ on:
1616
required: false
1717
default: false
1818

19+
push:
20+
branches:
21+
- cp/test-ucm-docker-image
22+
1923
jobs:
2024
docker-image:
2125
name: Build and push ucm docker image
2226
runs-on: ubuntu-20.04
27+
28+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
29+
permissions:
30+
contents: read
31+
# Allow uploading the docker image to the container registry
32+
packages: write
33+
# Allow creating and updating the artifact attestation
34+
attestations: write
35+
# Required to get user information for building attestations
36+
id-token: write
37+
38+
env:
39+
container_registry: ghcr.io
40+
docker_image_name: ${{ github.repository }}
41+
42+
2343
steps:
44+
- uses: actions/checkout@v4
45+
2446
- name: Download ucm executable and ucm UI
2547
uses: actions/download-artifact@v4
2648
with:
27-
path: /tmp/ucm
49+
name: bundle-linux
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
run-id: 8975410616
52+
path: ./tmp/downloads
53+
54+
- name: Unpack ucm bundle tar
55+
run: |
56+
ls -lah ./tmp/downloads
57+
mkdir -p ./tmp/ucm
58+
tar -xvf ./tmp/downloads/ucm-*.tar.gz -C ./tmp/ucm
59+
ls -lah ./tmp/ucm
2860
2961
# Configure Docker's builder,
3062
# This seems necessary to support docker cache layers.
@@ -49,15 +81,13 @@ jobs:
4981
# We tag latest manually below.
5082
latest=false
5183
tags: |
52-
type=schedule,pattern={{date 'YYYY-MM-DD'}}
53-
type=raw,value=v${{ inputs.version }},enable=${{ github.event.inputs.is_release }}
84+
type=schedule
85+
type=raw,value=v0.5.19,enable=true
5486
type=ref,event=tag
55-
type=ref,event=push
5687
type=sha,format=long
57-
type=raw,tag=${{ inputs.image_tag }}
5888
# set latest tag for pushes to trunk
59-
type=raw,value=latest,enable=${{ github.event.inputs.is_release }}
60-
type=raw,value=nightly,enable=${{ !github.event.inputs.is_release }}
89+
type=raw,value=latest,enable=true
90+
type=raw,value=nightly,enable=false
6191
6292
6393
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
@@ -67,7 +97,8 @@ jobs:
6797
id: push
6898
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
6999
with:
70-
context: ./docker/
100+
context: ./
101+
platforms: linux/amd64,linux/arm64
71102
push: true
72103
tags: ${{ steps.meta.outputs.tags }}
73104
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN chmod 555 /usr/local/bin/ucm
2020

2121
EXPOSE 8080
2222
ENTRYPOINT ["/usr/local/bin/ucm"]
23-
CMD ["--codebase","/unison"]
23+
CMD ["--codebase-create","/codebase"]

0 commit comments

Comments
 (0)