diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46f38d6..0e9f92f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,9 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 1 + - name: Set variables + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -92,7 +95,7 @@ jobs: env: REGISTRY: ${{ steps.login-ecr.outputs.registry }} REPOSITORY: express-graphql-example - TAG: ${GITHUB_REF#"refs/tags/"} + TAG: ${{ steps.vars.outputs.tag }} run: | docker build -t $REGISTRY/$REPOSITORY:$TAG . docker push $REGISTRY/$REPOSITORY:$TAG \ No newline at end of file