Skip to content

Commit

Permalink
ci: Update docker image to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo committed Jul 31, 2024
1 parent 6182aad commit 1b46ed9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Log into docker
run: docker login docker.pkg.github.com -u bahlo -p "${{ secrets.GITHUB_TOKEN }}"
run: docker login ghcr.io -u bahlo -p "${{ secrets.GITHUB_TOKEN }}"
- name: Build docker container
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags')
run: docker build -t docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:branch .
run: docker build -t ghcr.io/bahlo/ing-ynab:branch .
- name: Build and publish docker latest
if: github.ref == 'refs/heads/main'
run: |
docker build -t docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:latest .
docker push docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:latest
docker build -t ghcr.io/bahlo/ing-ynab:latest .
docker push ghcr.io/bahlo/ing-ynab:latest
- name: Build and publish docker image
if: startsWith(github.ref, 'refs/tags')
run: |
export TAG=$(echo "${{ github.ref }}" | sed 's/^refs\/tags\/v//g')
docker build -t docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:$TAG .
docker push docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:$TAG
docker build -t ghcr.io/bahlo/ing-ynab:$TAG .
docker push ghcr.io/bahlo/ing-ynab:$TAG
publish:
name: Publish on PyPi
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1b46ed9

Please sign in to comment.