Skip to content

fix: update Docker tags to use consistent syntax for SHORT_SHA #21

fix: update Docker tags to use consistent syntax for SHORT_SHA

fix: update Docker tags to use consistent syntax for SHORT_SHA #21

Workflow file for this run

name: Build and push
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Get Short SHA
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: test
run: |
echo ${SHORT_SHA}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64
tags: |
glapss/responcer:latest
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:"${SHORT_SHA}"