Skip to content

Update WORKDIR for final image (#3) #8

Update WORKDIR for final image (#3)

Update WORKDIR for final image (#3) #8

Workflow file for this run

name: CI
on:
push:
branches: ['main']
workflow_dispatch:
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
build_image:
runs-on: ubuntu-latest
needs: run_tests
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Defined versions, date and tag
run: |
image_create_date=$(date '+%Y-%m-%dT%H:%M:%S')
echo "image_create_date=$image_create_date" >> $GITHUB_ENV
echo "image_version=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Container meta
id: meta
uses: docker/metadata-action@v4
with:
images: exdial/cloud-tools
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: |
exdial/cloud-tools:latest
exdial/cloud-tools:${{ env.image_version }}
build-args: |
IMAGE_CREATE_DATE=${{ env.image_create_date }}
IMAGE_VERSION=${{ env.image_version }}