Skip to content

Commit

Permalink
Merge pull request #19 from simple-retro/ci/deploy-actions
Browse files Browse the repository at this point in the history
ci: manually publish to github registry
  • Loading branch information
Mewbi authored Feb 21, 2024
2 parents 39f214c + f2bc72e commit db2d434
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
packages: write
contents: read

env:
IMAGE_NAME: ghcr.io/simple-retro/backend

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build and publish Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/backend:latest
ghcr.io/${{ github.repository_owner }}/backend:${{ github.ref_name }}
env:
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: docker build . --file Dockerfile --tag ${IMAGE_NAME}:latest --tag ${IMAGE_NAME}:${{ github.ref_name }}

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Publish docker image
run: docker push --all-tags ${IMAGE_NAME}

0 comments on commit db2d434

Please sign in to comment.