Build(deps): Bump github/codeql-action from 3.27.9 to 3.28.0 (#236) #202
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: Docker Build | |
on: | |
push: | |
branches: [main] | |
### Ensures that only one CI task per branch/environment will run at a time ### | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
docker-build: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push docker image | |
shell: bash | |
env: | |
REGISTRY: dungpham91 | |
REPOSITORY: lint-json-inside-yaml | |
run: | | |
TAG_VERSION=$(git fetch --tags && git describe --tags $(git rev-list --tags --max-count=1)) | |
docker build \ | |
-t $REGISTRY/$REPOSITORY:${TAG_VERSION} \ | |
-t $REGISTRY/$REPOSITORY:latest \ | |
-f Dockerfile . | |
echo "Pushing image to repository..." | |
docker push $REGISTRY/$REPOSITORY --all-tags |