Skip to content

ci: Build public ghcr images #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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
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/ssh-agent@v0.8.0
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 }}'
Loading