Skip to content

Commit 2245d30

Browse files
committed
deploy container image workflow
1 parent a634ed5 commit 2245d30

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/deploy-image.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Build and deploy container image"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: "Get date time tag"
12+
run: echo "datetime_tag=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
13+
- name: "Build container image"
14+
run: |
15+
buildah bud \
16+
-t quay.io/openssl-ci/docs:$(git rev-parse --short HEAD) \
17+
-t quay.io/openssl-ci/docs:${{ env.datetime_tag }} \
18+
-t quay.io/openssl-ci/docs:latest \
19+
-f Containerfile
20+
- name: "Login to the container registry"
21+
run : buildah login -u="openssl-ci+machine" -p="${{ secrets.OPENSSL_MACHINE_TOKEN }}" quay.io
22+
- name: "Push container"
23+
run: |
24+
buildah push quay.io/openssl-ci/docs:$(git rev-parse --short HEAD)
25+
buildah push quay.io/openssl-ci/docs:${{ env.datetime_tag }}
26+
buildah push quay.io/openssl-ci/docs:latest

0 commit comments

Comments
 (0)