Skip to content

use env

use env #5

Workflow file for this run

# Workflow for building the container
name: Build the cjpv8 container
on:
# Runs on pushes targeting docker branch
push:
branches: ["actions"]
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "{date}={$(date +'%Y-%m-%d')}" >> $GITHUB_STATE
- name: Login to GitHub Container registry
uses: docker/login-action@v3
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registry: ghcr.io
username: $GITHUB_USER
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/wwu-trap/cjp8:$TAG
env:
TAG: ${{ steps.date.outputs.date }}