Skip to content

fix: correct substring method for Docker image tags to use the proper… #13

fix: correct substring method for Docker image tags to use the proper…

fix: correct substring method for Docker image tags to use the proper… #13

Workflow file for this run

name: Build and push

Check failure on line 1 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yaml

Invalid workflow file

(Line: 38, Col: 17): Unexpected symbol: 'sha::0:7'. Located at position 8 within expression: github.sha::0:7)
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: 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: Build and push
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64
tags: |
glapss/responcer:${{ github.sha::0:7) }}
glapss/responcer:latest
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha::0:7) }}