build: start scripting out flavor text data updater for other gens #1070
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: Branch Imager | |
on: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
Publish: | |
name: Publish image to container registries | |
runs-on: ubuntu-latest | |
if: "!(contains(github.event.head_commit.message, '[skip docker]'))" | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2.2.1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2.1.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get GitHub Branch Name | |
id: get_branch_name | |
run: echo ::set-output name=branch_name::$(echo $( [ -z "${{ github.head_ref }}" ] && echo ${{ github.ref }} | cut -c12- || echo ${{ github.head_ref }} ) | sed -e 's/\/\|_/-/g' | sed -e 's/@//g') | |
- name: Build and push Docker image | |
id: docker_build | |
uses: docker/build-push-action@v3.2.0 | |
with: | |
push: true | |
context: . | |
tags: | | |
favware/graphql-pokemon:${{ steps.get_branch_name.outputs.branch_name }} | |
ghcr.io/favware/graphql-pokemon:${{ steps.get_branch_name.outputs.branch_name }} |