Skip to content

build(deps): bump docker/login-action from 3 to 4 #240

build(deps): bump docker/login-action from 3 to 4

build(deps): bump docker/login-action from 3 to 4 #240

name: Build docker image
on:
push:
paths:
- '*.py'
- '**/*.py'
- 'Dockerfile'
- 'requirements.txt'
- '.github/workflows/*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: action-pack/increment@v2
with:
name: "VERSION"
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
latest
${{ vars.VERSION }}
- uses: robinraju/release-downloader@v1.12
with:
repository: "chenxiaolong/Custota"
latest: true
fileName: "custota-tool-*-x86_64-unknown-linux-gnu.zip"
- name: Unzip custota tool
run: unzip custota-tool-*-x86_64-unknown-linux-gnu.zip
- name: Remove zip
run: rm custota-tool-*-x86_64-unknown-linux-gnu.zip
- name: set permissions
run: chmod +x custota-tool
- name: check
run: ls -la
- uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
context: .
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max