Build(deps): Bump pandas from 2.0.3 to 2.1.0 #145
Workflow file for this run
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: Build Docker Image | |
on: | |
pull_request: | |
jobs: | |
docker: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
if: | |
( | |
contains(github.event.pull_request.labels.*.name, 'dependencies') == true && | |
github.base_ref == 'main' | |
) || | |
contains(github.event.pull_request.labels.*.name, 'ci') == true | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
Dockerfile | |
requirements.txt | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: huangfusl | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build docker image | |
run: | | |
docker build -t ghcr.io/huangfusl/blog-env:test . | |
docker push ghcr.io/huangfusl/blog-env:test | |
test: | |
needs: docker | |
name: Test | |
uses: ./.github/workflows/build.yml | |
with: | |
build-type: test | |
deploy: false | |
secrets: inherit | |
update-tag: | |
needs: test | |
name: Update tag | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: huangfusl | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Retag image | |
- name: Retag image | |
run: | | |
docker pull ghcr.io/huangfusl/blog-env:test | |
docker tag ghcr.io/huangfusl/blog-env:test ghcr.io/huangfusl/blog-env:build | |
docker push ghcr.io/huangfusl/blog-env:build |