Skip to content

tcgplayer: Fix off by one error in progress logging #337

tcgplayer: Fix off by one error in progress logging

tcgplayer: Fix off by one error in progress logging #337

Workflow file for this run

name: Bantool CI/CD
on:
push:
branches:
- 'master'
- 'id-swap'
env:
IMAGE: 'strudelboogie'
REGISTRY_HOSTNAME: 'gcr.io'
PROJECT_ID: '${{ secrets.GCP_PROJECT_ID }}'
jobs:
build:
name: 'build and push'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v3'
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCR_KEY }}'
- name: 'Set up Google Cloud SDK'
uses: 'google-github-actions/[email protected]'
with:
project_id: '${{ env.PROJECT_ID }}'
service_account_key: '${{ secrets.GCR_KEY }}'
- name: 'Configure Docker to use gcloud command-line tool'
run: 'gcloud auth configure-docker'
- name: 'Set Image Tag'
id: set_tag
run: |
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then
echo "TAG=latest" >> $GITHUB_ENV
else
echo "TAG=testing" >> $GITHUB_ENV
fi
- name: 'build/push image'
run: |
docker build -t $REGISTRY_HOSTNAME/$PROJECT_ID/$IMAGE:${{ env.TAG }} -f Dockerfile .
docker push $REGISTRY_HOSTNAME/$PROJECT_ID/$IMAGE:${{ env.TAG }}
if [[ ${{ env.TAG }} == 'latest' ]]; then
docker tag $REGISTRY_HOSTNAME/$PROJECT_ID/$IMAGE:latest $REGISTRY_HOSTNAME/$PROJECT_ID/$IMAGE:$GITHUB_SHA
docker push $REGISTRY_HOSTNAME/$PROJECT_ID/$IMAGE:$GITHUB_SHA
fi