Skip to content

Commit

Permalink
Build and push the image in docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyannn authored Dec 23, 2023
1 parent d04f1da commit 80a99cc
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,42 @@ on:
branches: [ "master" ]

jobs:

build:

runs-on: arc-runner

steps:
- name: Check out main repository
uses: actions/checkout@v3

- name: Check out aux repository 1
uses: actions/checkout@v3
-
name: Check out main repository
uses: actions/checkout@v4
-
name: Check out aux repository 1
uses: actions/checkout@v4
with:
repository: ilyannn/publish-secret-docs
path: publish-secret-docs
token: ${{ secrets.TOKEN_READ_MEGAVERSE_CONFIG }}

- name: Check out aux repository 2
uses: actions/checkout@v3
-
name: Check out aux repository 2
uses: actions/checkout@v4
with:
repository: ilyannn/hetzner-k3s-main
path: hetzner-k3s-main
token: ${{ secrets.TOKEN_READ_MEGAVERSE_CONFIG }}

- name: Build the Docker image
run: docker build . -t registry.cluster.megaver.se/library/hetzner-k3s-docs-webserver:$(date +%s)-arm64
-
name: Login to Cluster Registry
uses: docker/login-action@v3
with:
registry: registry.cluster.megaver.se
username: robot$github
password: ${{ secrets.HARBOR_TOKEN_ROBOT_GITHUB }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push the Docker image
# run: docker build . -t registry.cluster.megaver.se/library/hetzner-k3s-docs-webserver:$(date +%s)-arm64
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: registry.cluster.megaver.se/library/hetzner-k3s-docs-webserver:latest

0 comments on commit 80a99cc

Please sign in to comment.