Skip to content

Commit

Permalink
Merge pull request #245 from danihodovic/build-public-ghcr-images
Browse files Browse the repository at this point in the history
ci: Build public ghcr images
  • Loading branch information
adinhodovic authored Jun 13, 2024
2 parents 8e2b96d + f0f6072 commit a5d5df4
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ on:
- master

env:
IMAGE_REGISTRY: europe-west1-docker.pkg.dev
IMAGE_REPOSITORY: europe-west1-docker.pkg.dev/honeylogic/default/${{ github.event.repository.name }}
IMAGE_REPOSITORY: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}

DATABASE_URL: psql://postgres:postgres@localhost:5432/django_wtf
DJANGO_SETTINGS_MODULE: config.settings.test
Expand Down Expand Up @@ -48,9 +47,9 @@ jobs:
- name: Login to Image Registry
uses: docker/login-action@v2
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -98,7 +97,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down Expand Up @@ -183,7 +182,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down Expand Up @@ -231,28 +230,3 @@ jobs:
run: |
source .venv/bin/activate
pytest django_wtf --cov django_wtf # --run-concurrent
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'push' || github.event_name == 'release'
needs:
- build
- lint
- test
steps:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.OPS_DEPLOY_KEY }}
repository: "${{ github.event.organization.login }}/ops"

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.OPS_DEPLOY_KEY }}

- name: Release
if: github.event_name == 'push'
run: |
COMMIT_MESSAGE=$(echo "${{ github.event.head_commit.message }}")
./scripts/git-push.sh -v ${{ github.sha }} -m "$COMMIT_MESSAGE" -t '${{ github.event.repository.name }}' -a '${{ github.event.repository.name }}'

0 comments on commit a5d5df4

Please sign in to comment.