Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
webhook_secret: ${{ secrets.AAS_PRE_SHARED_KEY }}

dockerize:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development'
name: Package Docker image as artifact
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development'
name: Build and push Docker image to Harbor
needs: build
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
Expand All @@ -79,19 +79,19 @@ jobs:
with:
name: website-build-static-files
path: dist/

- name: Build Docker image
run: |
docker build -t astro-site:${{ github.sha }} . --build-arg BUILD_NUMBER=${{ github.run_id }}

# as we do not have a proper docker registry yet; just save it as an artifact. TODO: make this push to our self-hosted docker registry.
- name: Save Docker image as .tar
run: |
docker save astro-site | gzip > astro-site.tar.gz
- name: Log in to Harbor registry
uses: docker/login-action@v3
with:
registry: ${{ vars.HARBOR_REGISTRY }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}

- name: Upload Docker image artifact
uses: actions/upload-artifact@v4
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
name: astro-site-docker-image
path: astro-site.tar.gz
retention-days: 30
context: .
push: true
tags: ${{ vars.HARBOR_REGISTRY }}/${{ vars.HARBOR_PROJECT }}/intro-website:latest
build-args: |
BUILD_NUMBER=${{ github.run_id }}
Loading