Skip to content

Commit

Permalink
chore: update django-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 authored Nov 5, 2023
1 parent 72a174f commit f1b9209
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/django-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@ name: django-cd
on:
workflow_call:
workflow_dispatch:
inputs:
tag:
description: 'Tag to build against'
required: true
default: 'latest' # Default tag if not provided
push:
tags: "*"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10.6
uses: actions/setup-python@v4
with:
python-version: '3.10.6'
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Packages
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin

- name: Build Docker Image
run: docker build -t docker.pkg.github.com/${{ github.repository }}/anitrend:${{ github.event.inputs.tag }} .
working-directory: .

- name: Push Docker Image to GitHub Packages
run: docker push docker.pkg.github.com/${{ github.repository }}/anitrend:${{ github.event.inputs.tag }}

0 comments on commit f1b9209

Please sign in to comment.