new try #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging deployment | |
on: | |
push: | |
branches: | |
- staging | |
jobs: | |
publish-ghcr: | |
name: Publish docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log into registry | |
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
run: docker build -t ecorda . | |
- name: Push image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository }} | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
docker tag ecorda $IMAGE_ID:staging | |
docker push $IMAGE_ID:staging |