Implement versioning for esphome/esphome-lint docker images (#1877)

This commit is contained in:
Otto Winter 2021-06-08 21:28:19 +02:00 committed by GitHub
parent a70a205ace
commit 01e2a51132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

View file

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Set up the pio project so that the cpp checks know how files are compiled # Set up the pio project so that the cpp checks know how files are compiled
@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
# Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files # Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files
strategy: strategy:
fail-fast: false fail-fast: false

View file

@ -17,6 +17,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set TAG
run: |
echo "TAG=1.0" >> $GITHUB_ENV
- name: Pull for cache - name: Pull for cache
run: | run: |
docker pull "esphome/esphome-lint:latest" || true docker pull "esphome/esphome-lint:latest" || true
@ -26,6 +29,7 @@ jobs:
--cache-from "esphome/esphome-lint:latest" \ --cache-from "esphome/esphome-lint:latest" \
--file "docker/Dockerfile.lint" \ --file "docker/Dockerfile.lint" \
--tag "esphome/esphome-lint:latest" \ --tag "esphome/esphome-lint:latest" \
--tag "esphome/esphome-lint:${TAG}" \
. .
- name: Log in to docker hub - name: Log in to docker hub
env: env:
@ -33,4 +37,5 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}" run: docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}"
- run: | - run: |
docker push "esphome/esphome-lint:${TAG}"
docker push "esphome/esphome-lint:latest" docker push "esphome/esphome-lint:latest"

View file

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Set up the pio project so that the cpp checks know how files are compiled # Set up the pio project so that the cpp checks know how files are compiled
@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
# Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files # Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files
strategy: strategy:
fail-fast: false fail-fast: false

View file

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Set up the pio project so that the cpp checks know how files are compiled # Set up the pio project so that the cpp checks know how files are compiled
@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# cpp lint job runs with esphome-lint docker image so that clang-format-* # cpp lint job runs with esphome-lint docker image so that clang-format-*
# doesn't have to be installed # doesn't have to be installed
container: esphome/esphome-lint:latest container: esphome/esphome-lint:1.0
# Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files # Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files
strategy: strategy:
fail-fast: false fail-fast: false