Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Update README.md

Update README.md #82

name: Build and Push Bot
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- id: checkout
uses: actions/checkout@v4
- id: auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: 'projects/979321260256/locations/global/workloadIdentityPools/github/providers/github'
service_account: '${{ github.repository_owner }}@pokerai-417521.iam.gserviceaccount.com'
access_token_lifetime: 300s
- name: Login to Artifact Registry
uses: docker/login-action@v3
with:
registry: us-east4-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Get tag # not quite sure if this is needed lowkey
id: get-tag
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
- id: docker-push-tagged
name: Tag Docker image and push to Google Artifact Registry
uses: docker/build-push-action@v5
with:
push: true
tags: |
us-east4-docker.pkg.dev/pokerai-417521/${{ github.repository_owner }}/pokerbot:${{ steps.get-tag.outputs.short_ref }}
us-east4-docker.pkg.dev/pokerai-417521/${{ github.repository_owner }}/pokerbot:latest
file: dockerfiles/python_skeleton/Dockerfile