Merge pull request #3 from Memphis-ARTCC/develop #2
Workflow file for this run
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: Build & Push Prod | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
BuildAndPush: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build api image | |
run: | | |
docker build -t zme-api -f Memphis.API/Dockerfile . | |
- name: Tag images | |
run: | | |
docker tag zme-api ghcr.io/memphis-artcc/api:latest | |
docker tag zme-api ghcr.io/memphis-artcc/api:${{ env.RELEASE_VERSION }} | |
- name: Push images | |
run: | | |
docker push ghcr.io/memphis-artcc/api:latest | |
docker push ghcr.io/memphis-artcc/api:${{ env.RELEASE_VERSION }} |