diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f225d09..f4d3ff2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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