From b61a6209ac33e08e6a48ce702abfb417933a39be Mon Sep 17 00:00:00 2001 From: Jared Knipp Date: Tue, 30 Apr 2024 17:34:00 -0500 Subject: [PATCH] Attempt Docker build and push --- .github/workflows/main.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5b1cce..f3d9386 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,12 +18,31 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Run a one-line script - uses: docker/build-push-action@v5 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: spreedly/phasers-worksample + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: name/app + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: spreedly/phasers-worksample + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v5 + with: + context: . + push: true tags: latest