Skip to content

Commit 1faa88b

Browse files
Push Docker image
1 parent 8707215 commit 1faa88b

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,20 @@ jobs:
2121
(cd Resources/parsers/50800 && swift test)
2222
(cd Resources/parsers/50900 && swift test)
2323
(cd Resources/parsers/trunk && swift test)
24-
- name: Build
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v2
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
- name: Build and push
2532
run: |
2633
set -ex
2734
28-
(cd Resources/parsers/50800 && swift build -c release -Xswiftc -static-executable)
29-
(cd Resources/parsers/50900 && swift build -c release -Xswiftc -static-executable)
30-
(cd Resources/parsers/trunk && swift build -c release -Xswiftc -static-executable)
35+
cd ./Playground
3136
32-
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
33-
git config --global user.name "${GITHUB_ACTOR}"
34-
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
35-
if (git diff --shortstat | grep '[0-9]'); then \
36-
git add .; \
37-
git commit -m "Update parsers"; \
38-
git push origin HEAD:${GITHUB_REF}; \
39-
fi
37+
IMAGE_TAG=kishikawakatsumi/swift-ast-explorer.com:latest
4038
41-
docker build --rm --no-cache --build-arg FONTAWESOME_TOKEN=${{ env.FONTAWESOME_TOKEN }} .
39+
docker build --rm --no-cache --build-arg FONTAWESOME_TOKEN=${{ env.FONTAWESOME_TOKEN }} --tag ${IMAGE_TAG} .
40+
docker push ${IMAGE_TAG}

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY Public ./Public/
1313
RUN npx webpack --config webpack.prod.js
1414

1515

16-
FROM swift:5.8-focal as swift
16+
FROM swift:5.8-jammy as swift
1717
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
1818
&& apt-get -q update \
1919
&& apt-get -q dist-upgrade -y\
@@ -27,9 +27,9 @@ RUN swift package resolve
2727
COPY . .
2828
RUN swift build -c release --static-swift-stdlib
2929

30-
RUN cd Resources/parsers/50800 && swift build -c release -Xswiftc -static-executable
31-
RUN cd Resources/parsers/50900 && swift build -c release -Xswiftc -static-executable
32-
RUN cd Resources/parsers/trunk && swift build -c release -Xswiftc -static-executable
30+
RUN cd Resources/parsers/50800 && swift build -c release --static-swift-stdlib
31+
RUN cd Resources/parsers/50900 && swift build -c release --static-swift-stdlib
32+
RUN cd Resources/parsers/trunk && swift build -c release --static-swift-stdlib
3333

3434
WORKDIR /staging
3535

@@ -41,7 +41,7 @@ RUN [ -d /build/Public ] && { mv /build/Public ./Public && chmod -R a-w ./Public
4141
RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w ./Resources; } || true
4242

4343

44-
FROM swift:5.8-focal
44+
FROM ubuntu:jammy
4545
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
4646
&& apt-get -q update \
4747
&& apt-get -q dist-upgrade -y \

0 commit comments

Comments
 (0)