Skip to content

Build and Publish Historic Public CSV Data #8

Build and Publish Historic Public CSV Data

Build and Publish Historic Public CSV Data #8

Workflow file for this run

---
name: Build and Publish Historic Public CSV Data
on:
workflow_dispatch:
env:
DOCKER_NAME: historic-public-csvs
IMAGE: load-historic-public-data
GH_REPO: gsa-tts/fac-historic-public-csvs
jobs:
build-data:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get Date
shell: bash
id: date
run: |
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Docker Image
run: docker build . -t ${{ env.DOCKER_NAME }}:${{ steps.date.outputs.date }}
- name: Tag Image
run: |
docker tag ${{ env.DOCKER_NAME }}:${{ steps.date.outputs.date }} ghcr.io/${{ env.GH_REPO }}/${{ env.IMAGE }}:${{ steps.date.outputs.date }}
docker tag ${{ env.DOCKER_NAME }}:${{ steps.date.outputs.date }} ghcr.io/${{ env.GH_REPO }}/${{ env.IMAGE }}:latest
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Image
run: docker push --all-tags ghcr.io/${{ env.GH_REPO }}/${{ env.IMAGE }}