Skip to content

Commit

Permalink
Fix build order (#88)
Browse files Browse the repository at this point in the history
* Fix build order

If actionlint is built as per previous commit, it means git / python3 is not available for the rest of the in-progress basic.yml tests

Signed-off-by: JP Lomas <[email protected]>

* Correct path of AL build

Signed-off-by: JP Lomas <[email protected]>

---------

Signed-off-by: JP Lomas <[email protected]>
  • Loading branch information
jplomas authored Sep 3, 2024
1 parent 59ed5d8 commit 7f2a604
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions ubuntu-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
FROM ubuntu:latest
FROM ubuntu:latest as base
LABEL version="2"

# actionlint - for GitHub workflow file validation
# (version pinned to commit hash of v1.7.1)
FROM golang:1.23 as build
RUN mkdir /app
WORKDIR /app
ENV CGO_ENABLED 0
RUN git clone https://github.com/rhysd/actionlint.git
WORKDIR /app/actionlint
RUN git reset --hard 62dc61a
RUN go build -o /usr/local/bin/actionlint ./cmd/actionlint
# copy built binary from build stage to final image
FROM ubuntu:latest
WORKDIR /root
COPY --from=build /usr/local/bin/actionlint /usr/local/bin/actionlint

RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
Expand Down Expand Up @@ -58,19 +73,5 @@ RUN opam init --yes --auto-setup && opam install --confirm-level=unsafe-yes --de
# install ajv for CBOM validation
RUN npm -g install ajv ajv-cli

# actionlint - for GitHub workflow file validation
# (version pinned to commit hash of v1.7.1)
FROM golang:1.23 AS build
RUN mkdir /app
WORKDIR /app
ENV CGO_ENABLED 0
RUN git clone https://github.com/rhysd/actionlint.git
WORKDIR /app/actionlint
RUN git reset --hard 62dc61a
RUN go build -o /usr/local/bin/actionlint ./cmd/actionlint
# copy built binary from build stage to final image
FROM ubuntu:latest
COPY --from=build /usr/local/bin/actionlint /usr/local/bin/actionlint

# Activate if we want to test specific OpenSSL3 versions:
# RUN cd /root && git clone --depth 1 --branch openssl-3.0.7 https://github.com/openssl/openssl.git && cd openssl && LDFLAGS="-Wl,-rpath -Wl,/usr/local/openssl3/lib64" ./config --prefix=/usr/local/openssl3 && make -j && make install
# RUN cd /root && git clone --depth 1 --branch openssl-3.0.7 https://github.com/openssl/openssl.git && cd openssl && LDFLAGS="-Wl,-rpath -Wl,/usr/local/openssl3/lib64" ./config --prefix=/usr/local/openssl3 && make -j && make install

0 comments on commit 7f2a604

Please sign in to comment.